From 959aba6b1370e4ceb9b046ec5dc1fda5573ddd8d Mon Sep 17 00:00:00 2001 From: Sayamame-beans <61457993+Sayamame-beans@users.noreply.github.com> Date: Sun, 23 Jun 2024 12:14:46 +0000 Subject: [PATCH] fix(backend): mention was not considered for mute --- packages/backend/src/misc/is-user-related.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/backend/src/misc/is-user-related.ts b/packages/backend/src/misc/is-user-related.ts index 93c9b2b814..1604fd0419 100644 --- a/packages/backend/src/misc/is-user-related.ts +++ b/packages/backend/src/misc/is-user-related.ts @@ -8,6 +8,10 @@ export function isUserRelated(note: any, userIds: Set, ignoreAuthor = fa return true; } + if (note.mentions != null && note.mentions.filter(userId => userId !== note.userId && userIds.has(userId)).length > 0) { + return true; + } + if (note.reply != null && note.reply.userId !== note.userId && userIds.has(note.reply.userId)) { return true; }