From 28e394eddc2b38db1bf2a5bf1059092fda8ce2a2 Mon Sep 17 00:00:00 2001 From: GrapeApple0 <84321396+GrapeApple0@users.noreply.github.com> Date: Thu, 9 Nov 2023 21:35:07 +0900 Subject: fix: 投稿通知がオンでもダイレクト投稿はユーザーに通知されないように (#12263) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: 投稿通知がオンでもダイレクト投稿はユーザーに通知されないように * Update CHANGELOG.md --- CHANGELOG.md | 1 + packages/backend/src/core/NoteCreateService.ts | 12 +++++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cce678c614..e4617d0e67 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ ### Server - Fix: トークンのないプラグインをアンインストールするときにエラーが出ないように +- Fix: 投稿通知がオンでもダイレクト投稿はユーザーに通知されないようにされました ## 2023.11.0 diff --git a/packages/backend/src/core/NoteCreateService.ts b/packages/backend/src/core/NoteCreateService.ts index acd11a9fa7..86f220abd0 100644 --- a/packages/backend/src/core/NoteCreateService.ts +++ b/packages/backend/src/core/NoteCreateService.ts @@ -521,11 +521,13 @@ export class NoteCreateService implements OnApplicationShutdown { followeeId: user.id, notify: 'normal', }).then(followings => { - for (const following of followings) { - // TODO: ワードミュート考慮 - this.notificationService.createNotification(following.followerId, 'note', { - noteId: note.id, - }, user.id); + if (note.visibility !== 'specified') { + for (const following of followings) { + // TODO: ワードミュート考慮 + this.notificationService.createNotification(following.followerId, 'note', { + noteId: note.id, + }, user.id); + } } }); } -- cgit v1.2.3-freya