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) {