[backend/api] Fix erroneous values regarding reply/quote inaccessibility

This commit is contained in:
Laura Hausmann 2024-09-28 04:35:40 +02:00
parent 99ea086731
commit 97de0b8410
No known key found for this signature in database
GPG key ID: D044E84C5BE01605

View file

@ -49,7 +49,7 @@ public class NoteRenderer(
res.QuoteInaccessible = note.RenoteUri != null;
res.Reply = reply;
res.ReplyId = note.ReplyId;
res.ReplyInaccessible = note.ReplyUri != null;
res.ReplyInaccessible = note.Reply == null && (note.ReplyId != null || note.ReplyUri != null);
return res;
}
@ -61,7 +61,7 @@ public class NoteRenderer(
res.Quote = quote;
res.QuoteId = note.RenoteId;
res.QuoteInaccessible = note.RenoteUri != null;
res.QuoteInaccessible = note.Renote == null && (note.ReplyId != null || note.RenoteUri != null);
return res;
}