diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index f8ef41ea0..a5b1b3ed2 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -805,6 +805,7 @@ makeReactionsPublicDescription: "あなたがしたリアクション一覧を classic: "クラシック" muteThread: "スレッドをミュート" unmuteThread: "スレッドのミュートを解除" +threadMuteNotificationsDesc: "このスレッドから表示する通知を選択します。グローバル通知設定も適用され、禁止が優先されます。" ffVisibility: "つながりの公開範囲" ffVisibilityDescription: "自分のフォロー/フォロワー情報の公開範囲を設定できます。" continueThread: "さらにスレッドを見る" diff --git a/packages/backend/src/server/api/endpoints/notes/thread-muting/create.ts b/packages/backend/src/server/api/endpoints/notes/thread-muting/create.ts index 3181041a8..f4bd4186d 100644 --- a/packages/backend/src/server/api/endpoints/notes/thread-muting/create.ts +++ b/packages/backend/src/server/api/endpoints/notes/thread-muting/create.ts @@ -1,5 +1,5 @@ import { noteNotificationTypes } from 'foundkey-js'; -import { Notes, NoteThreadMutings } from '@/models/index.js'; +import { Notes, NoteThreadMutings, NoteWatchings } from '@/models/index.js'; import { genId } from '@/misc/gen-id.js'; import readNote from '@/services/note/read.js'; import define from '../../../define.js'; @@ -62,4 +62,17 @@ export default define(meta, paramDef, async (ps, user) => { userId: user.id, mutingNotificationTypes: ps.mutingNotificationTypes, }); + + // remove all note watchings in the muted thread + const notesThread = Notes.createQueryBuilder("notes") + .select("note.id") + .where({ + threadId: note.threadId ?? note.id, + }); + + await NoteWatchings.createQueryBuilder() + .delete() + .where(`"note_watching"."noteId" IN (${ notesThread.getQuery() })`) + .setParameters(notesThread.getParameters()) + .execute(); }); diff --git a/packages/client/src/components/notification-setting-window.vue b/packages/client/src/components/notification-setting-window.vue index 7bcf2768f..4edbda033 100644 --- a/packages/client/src/components/notification-setting-window.vue +++ b/packages/client/src/components/notification-setting-window.vue @@ -18,7 +18,7 @@