[backend/api-shared] Also filter renotes & quotes mentioning muted/blocked users

This commit is contained in:
Laura Hausmann 2024-09-27 19:50:23 +02:00
parent f39c6bb80d
commit 5192b58150
No known key found for this signature in database
GPG key ID: D044E84C5BE01605

View file

@ -513,8 +513,9 @@ public static class QueryableExtensions
return note => !hidden.Contains(note.UserId) && return note => !hidden.Contains(note.UserId) &&
!hidden.Contains(note.RenoteUserId) && !hidden.Contains(note.RenoteUserId) &&
!hidden.Contains(note.ReplyUserId) && !hidden.Contains(note.ReplyUserId) &&
note.Mentions.IsDisjoint(mentionsHidden) &&
(note.Renote == null || !hidden.Contains(note.Renote.RenoteUserId)) && (note.Renote == null || !hidden.Contains(note.Renote.RenoteUserId)) &&
note.Mentions.IsDisjoint(mentionsHidden); (note.Renote == null || !note.Renote.Mentions.IsDisjoint(mentionsHidden));
} }
return note => !hidden.Contains(note.UserId) && return note => !hidden.Contains(note.UserId) &&