[backend/core] Renote/reply visibility should fall back invisible

This commit is contained in:
Laura Hausmann 2024-02-22 20:50:23 +01:00
parent b4fea308f7
commit f58538fdae
No known key found for this signature in database
GPG key ID: D044E84C5BE01605

View file

@ -245,9 +245,9 @@ public static class QueryableExtensions
public static Note EnforceRenoteReplyVisibility(this Note note) public static Note EnforceRenoteReplyVisibility(this Note note)
{ {
if (!note.PrecomputedIsReplyVisible ?? false) if (!(note.PrecomputedIsReplyVisible ?? false))
note.Reply = null; note.Reply = null;
if (!note.PrecomputedIsRenoteVisible ?? false) if (!(note.PrecomputedIsRenoteVisible ?? false))
note.Renote = null; note.Renote = null;
return note; return note;
@ -262,9 +262,9 @@ public static class QueryableExtensions
{ {
var note = predicate.Compile().Invoke(source); var note = predicate.Compile().Invoke(source);
if (note == null) return source; if (note == null) return source;
if (!note.PrecomputedIsReplyVisible ?? false) if (!(note.PrecomputedIsReplyVisible ?? false))
note.Reply = null; note.Reply = null;
if (!note.PrecomputedIsRenoteVisible ?? false) if (!(note.PrecomputedIsRenoteVisible ?? false))
note.Renote = null; note.Renote = null;
return source; return source;