summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarie <marie@kaifa.ch>2024-01-25 19:39:41 +0100
committerMarie <marie@kaifa.ch>2024-01-25 19:39:41 +0100
commite89f4ff3c8dd56e458ac6e9b5dc58c79910f73cf (patch)
treeed9537c227cfbd4d365e702de5a5fc9fceb6d6ff
parentfix(ci): lint failing to build bubble game (diff)
downloadsharkey-e89f4ff3c8dd56e458ac6e9b5dc58c79910f73cf.tar.gz
sharkey-e89f4ff3c8dd56e458ac6e9b5dc58c79910f73cf.tar.bz2
sharkey-e89f4ff3c8dd56e458ac6e9b5dc58c79910f73cf.zip
fix: boosts not being muted when muting thread
Closes #347
-rw-r--r--packages/backend/src/core/NoteCreateService.ts11
1 files changed, 10 insertions, 1 deletions
diff --git a/packages/backend/src/core/NoteCreateService.ts b/packages/backend/src/core/NoteCreateService.ts
index 345367f052..f03316744d 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