From 54e94263a8c194d59930428809eeaa6837d4e55f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=8B=E3=81=A3=E3=81=93=E3=81=8B=E3=82=8A?= <67428053+kakkokari-gtyih@users.noreply.github.com> Date: Fri, 20 Mar 2026 19:11:56 +0900 Subject: [PATCH] =?UTF-8?q?fix(backend):=20=E3=83=81=E3=83=A3=E3=83=B3?= =?UTF-8?q?=E3=83=8D=E3=83=AB=E3=83=9F=E3=83=A5=E3=83=BC=E3=83=88=E3=82=92?= =?UTF-8?q?=E6=9C=89=E5=8A=B9=E3=81=AB=E3=81=97=E3=81=A6=E3=81=84=E3=82=8B?= =?UTF-8?q?=E9=9A=9B=E3=81=AB=E3=83=8E=E3=83=BC=E3=83=88=E3=81=AE=E9=96=B2?= =?UTF-8?q?=E8=A6=A7=E3=81=8C=E3=81=A7=E3=81=8D=E3=81=AA=E3=81=8F=E3=81=AA?= =?UTF-8?q?=E3=82=8B=E3=81=93=E3=81=A8=E3=81=8C=E3=81=82=E3=82=8B=E5=95=8F?= =?UTF-8?q?=E9=A1=8C=E3=82=92=E4=BF=AE=E6=AD=A3=20(#17251)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(backend): チャンネルミュート使用時にユーザーのノート一覧読み込みに失敗する問題を修正 * more fix * Update Changelog --- CHANGELOG.md | 1 + .../backend/src/server/api/endpoints/channels/timeline.ts | 6 +++++- packages/backend/src/server/api/endpoints/notes/timeline.ts | 5 ++++- packages/backend/src/server/api/endpoints/users/notes.ts | 5 ++++- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0d43754dbd..c2f4cf8acd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ - Fix: 自分の行ったフォロワー限定投稿または指名投稿に自分自身でリアクションなどを行った場合のイベントが流れない問題を修正 - Fix: 署名付きGETリクエストにおいてAcceptヘッダを署名の対象から除外(Acceptヘッダを正規化するCDNやリバースプロキシを使用している際に挙動がおかしくなる問題を修正) - Fix: WebSocket接続におけるノートの非表示ロジックを修正 +- Fix: チャンネルミュートを有効にしている際に、一部のタイムラインやノート一覧が空になる問題を修正 ## 2026.3.1 diff --git a/packages/backend/src/server/api/endpoints/channels/timeline.ts b/packages/backend/src/server/api/endpoints/channels/timeline.ts index 4f56bc2110..e088869457 100644 --- a/packages/backend/src/server/api/endpoints/channels/timeline.ts +++ b/packages/backend/src/server/api/endpoints/channels/timeline.ts @@ -15,6 +15,7 @@ import { FanoutTimelineEndpointService } from '@/core/FanoutTimelineEndpointServ import { MiLocalUser } from '@/models/User.js'; import { ChannelMutingService } from '@/core/ChannelMutingService.js'; import { ApiError } from '../../error.js'; +import { Brackets } from 'typeorm'; export const meta = { tags: ['notes', 'channels'], @@ -132,7 +133,10 @@ export default class extends Endpoint { // eslint- .then(x => x.map(x => x.id).filter(x => x !== ps.channelId)); if (mutingChannelIds.length > 0) { query.andWhere('note.channelId NOT IN (:...mutingChannelIds)', { mutingChannelIds }); - query.andWhere('note.renoteChannelId NOT IN (:...mutingChannelIds)', { mutingChannelIds }); + query.andWhere(new Brackets(qb => { + qb.orWhere('note.renoteChannelId IS NULL'); + qb.orWhere('note.renoteChannelId NOT IN (:...mutingChannelIds)', { mutingChannelIds }); + })); } } //#endregion diff --git a/packages/backend/src/server/api/endpoints/notes/timeline.ts b/packages/backend/src/server/api/endpoints/notes/timeline.ts index fe9c412be4..b00247c69d 100644 --- a/packages/backend/src/server/api/endpoints/notes/timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/timeline.ts @@ -177,7 +177,10 @@ export default class extends Endpoint { // eslint- .andWhere('note.channelId IS NULL') .andWhere('note.userId IN (:...meOrFolloweeIds)', { meOrFolloweeIds: meOrFolloweeIds }); if (mutingChannelIds.length > 0) { - qb.andWhere('note.renoteChannelId NOT IN (:...mutingChannelIds)', { mutingChannelIds }); + qb.andWhere(new Brackets(qb2 => { + qb2.orWhere('note.renoteChannelId IS NULL'); + qb2.orWhere('note.renoteChannelId NOT IN (:...mutingChannelIds)', { mutingChannelIds }); + })); } })); } else if (followingChannelIds.length > 0) { diff --git a/packages/backend/src/server/api/endpoints/users/notes.ts b/packages/backend/src/server/api/endpoints/users/notes.ts index b9710250cf..e280b367f9 100644 --- a/packages/backend/src/server/api/endpoints/users/notes.ts +++ b/packages/backend/src/server/api/endpoints/users/notes.ts @@ -185,7 +185,10 @@ export default class extends Endpoint { // eslint- if (ps.withChannelNotes) { query.andWhere(new Brackets(qb => { if (mutingChannelIds.length > 0) { - qb.andWhere('note.channelId NOT IN (:...mutingChannelIds)', { mutingChannelIds: mutingChannelIds }); + qb.andWhere(new Brackets(qb2 => { + qb2.orWhere('note.channelId IS NULL'); + qb2.orWhere('note.channelId NOT IN (:...mutingChannelIds)', { mutingChannelIds }); + })); } if (!isSelf) {