server: fix thread mutes not applying to renotes

Changelog: Fixed
This commit is contained in:
Johann150 2022-12-15 21:20:24 +01:00
parent af43df15ca
commit 6c7f1774e3
Signed by untrusted user: Johann150
GPG key ID: 9EE6577A2A06F8F1

View file

@ -98,7 +98,12 @@ class NotificationManager {
const threadMuted = await NoteThreadMutings.findOneBy({ const threadMuted = await NoteThreadMutings.findOneBy({
userId: x.target, 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]), mutingNotificationTypes: ArrayOverlap([x.reason]),
}); });