[backend/masto-client] Fix IsApplicableBool check in UserChannel

This commit is contained in:
Laura Hausmann 2024-05-23 14:48:16 +02:00
parent 0f69013224
commit 329f677075
No known key found for this signature in database
GPG key ID: D044E84C5BE01605

View file

@ -62,7 +62,9 @@ public class UserChannel(WebSocketConnection connection, bool notificationsOnly)
} }
private bool IsApplicableBool(Note note) => private bool IsApplicableBool(Note note) =>
connection.Following.Prepend(connection.Token.User.Id).Contains(note.UserId); connection.Following.Prepend(connection.Token.User.Id).Contains(note.UserId) &&
(note.Visibility <= Note.NoteVisibility.Followers ||
note.IsVisibleFor(connection.Token.User, connection.Following));
private bool IsApplicable(Notification notification) => notification.NotifieeId == connection.Token.User.Id; private bool IsApplicable(Notification notification) => notification.NotifieeId == connection.Token.User.Id;