server: fix thread mutes not applying to renotes

Changelog: Fixed
This commit is contained in:
Johann150 2022-12-15 21:20:24 +01:00 committed by ThatOneCalculator
parent 8520be65c7
commit f74f475dc4
No known key found for this signature in database
GPG Key ID: 8703CACD01000000
1 changed files with 6 additions and 1 deletions

View File

@ -116,7 +116,12 @@ class NotificationManager {
const threadMuted = await NoteThreadMutings.findOneBy({
userId: x.target,
threadId: this.note.threadId || this.note.id,
threadId: In([
// replies
this.note.threadId ?? this.note.id,
// renotes
this.note.renoteId ?? undefined
]),
mutingNotificationTypes: ArrayOverlap([x.reason]),
});