diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2023-11-02 15:57:55 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2023-11-02 15:57:55 +0900 |
| commit | f62ad3ed3eccfd242b2d1f1e25f00276f2bfff77 (patch) | |
| tree | 4c7280ec000d49ae69f31b97fb1043d20c3de0f1 /packages/backend/src/core/NoteCreateService.ts | |
| parent | fix(frontend): /about の連合タブのレイアウトが一部崩れてい... (diff) | |
| download | sharkey-f62ad3ed3eccfd242b2d1f1e25f00276f2bfff77.tar.gz sharkey-f62ad3ed3eccfd242b2d1f1e25f00276f2bfff77.tar.bz2 sharkey-f62ad3ed3eccfd242b2d1f1e25f00276f2bfff77.zip | |
feat: notification grouping
Resolve #12211
Diffstat (limited to 'packages/backend/src/core/NoteCreateService.ts')
| -rw-r--r-- | packages/backend/src/core/NoteCreateService.ts | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/packages/backend/src/core/NoteCreateService.ts b/packages/backend/src/core/NoteCreateService.ts index 6caa3d463c..acd11a9fa7 100644 --- a/packages/backend/src/core/NoteCreateService.ts +++ b/packages/backend/src/core/NoteCreateService.ts @@ -100,17 +100,14 @@ class NotificationManager { } @bindThis - public async deliver() { + public async notify() { for (const x of this.queue) { - // ミュート情報を取得 - const mentioneeMutes = await this.mutingsRepository.findBy({ - muterId: x.target, - }); - - const mentioneesMutedUserIds = mentioneeMutes.map(m => m.muteeId); - - // 通知される側のユーザーが通知する側のユーザーをミュートしていない限りは通知する - if (!mentioneesMutedUserIds.includes(this.notifier.id)) { + if (x.reason === 'renote') { + this.notificationService.createNotification(x.target, 'renote', { + noteId: this.note.id, + targetNoteId: this.note.renoteId!, + }, this.notifier.id); + } else { this.notificationService.createNotification(x.target, x.reason, { noteId: this.note.id, }, this.notifier.id); @@ -642,7 +639,7 @@ export class NoteCreateService implements OnApplicationShutdown { } } - nm.deliver(); + nm.notify(); //#region AP deliver if (this.userEntityService.isLocalUser(user)) { |