fix: boosts not being muted when muting thread

Closes #347
This commit is contained in:
Marie 2024-01-25 19:39:41 +01:00
parent c1d38b02d7
commit e89f4ff3c8
No known key found for this signature in database
GPG Key ID: 56569BBE47D2C828
1 changed files with 10 additions and 1 deletions

View File

@ -816,8 +816,17 @@ export class NoteCreateService implements OnApplicationShutdown {
// Notify // Notify
if (data.renote.userHost === null) { if (data.renote.userHost === null) {
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); nm.push(data.renote.userId, type);
} }
}
// Publish event // Publish event
if ((user.id !== data.renote.userId) && data.renote.userHost === null) { if ((user.id !== data.renote.userId) && data.renote.userHost === null) {