From 329f67707591cb8460e22ba6d5710cd6ae75c753 Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Thu, 23 May 2024 14:48:16 +0200 Subject: [PATCH] [backend/masto-client] Fix IsApplicableBool check in UserChannel --- .../Controllers/Mastodon/Streaming/Channels/UserChannel.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Iceshrimp.Backend/Controllers/Mastodon/Streaming/Channels/UserChannel.cs b/Iceshrimp.Backend/Controllers/Mastodon/Streaming/Channels/UserChannel.cs index cf8f1e63..b29b000e 100644 --- a/Iceshrimp.Backend/Controllers/Mastodon/Streaming/Channels/UserChannel.cs +++ b/Iceshrimp.Backend/Controllers/Mastodon/Streaming/Channels/UserChannel.cs @@ -62,7 +62,9 @@ public class UserChannel(WebSocketConnection connection, bool notificationsOnly) } 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;