From e89f4ff3c8dd56e458ac6e9b5dc58c79910f73cf Mon Sep 17 00:00:00 2001 From: Marie Date: Thu, 25 Jan 2024 19:39:41 +0100 Subject: [PATCH] fix: boosts not being muted when muting thread Closes #347 --- packages/backend/src/core/NoteCreateService.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/backend/src/core/NoteCreateService.ts b/packages/backend/src/core/NoteCreateService.ts index 345367f05..f03316744 100644 --- a/packages/backend/src/core/NoteCreateService.ts +++ b/packages/backend/src/core/NoteCreateService.ts @@ -816,7 +816,16 @@ export class NoteCreateService implements OnApplicationShutdown { // Notify if (data.renote.userHost === null) { - nm.push(data.renote.userId, type); + const isThreadMuted = await this.noteThreadMutingsRepository.exist({ + where: { + userId: data.renote.userId, + threadId: data.renote.threadId ?? data.renote.id, + }, + }); + + if (!isThreadMuted) { + nm.push(data.renote.userId, type); + } } // Publish event