From 47cf7f68221a98f6a619da7ad0a6f21a7b5fec21 Mon Sep 17 00:00:00 2001 From: Marie Date: Fri, 26 Jan 2024 01:39:01 +0100 Subject: [PATCH] fix: don't show replies to muted users in timelines Closes #337 --- packages/backend/src/core/FanoutTimelineEndpointService.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/backend/src/core/FanoutTimelineEndpointService.ts b/packages/backend/src/core/FanoutTimelineEndpointService.ts index 6d857d189e..a3c8c21e98 100644 --- a/packages/backend/src/core/FanoutTimelineEndpointService.ts +++ b/packages/backend/src/core/FanoutTimelineEndpointService.ts @@ -122,6 +122,7 @@ export class FanoutTimelineEndpointService { filter = (note) => { if (isUserRelated(note, userIdsWhoBlockingMe, ps.ignoreAuthorFromBlock)) return false; if (isUserRelated(note, userIdsWhoMeMuting, ps.ignoreAuthorFromMute)) return false; + if (note.mentions.some(mention => userIdsWhoMeMuting.has(mention))) return false; if (isPureRenote(note) && isUserRelated(note, userIdsWhoMeMutingRenotes, ps.ignoreAuthorFromMute)) return false; if (isInstanceMuted(note, userMutedInstances)) return false;