diff --git a/packages/backend/src/core/FanoutTimelineEndpointService.ts b/packages/backend/src/core/FanoutTimelineEndpointService.ts index befbff43e4..af0b7f0e20 100644 --- a/packages/backend/src/core/FanoutTimelineEndpointService.ts +++ b/packages/backend/src/core/FanoutTimelineEndpointService.ts @@ -41,7 +41,8 @@ type TimelineOptions = { excludeReplies?: boolean; excludePureRenotes: boolean; ignoreAuthorFromUserSuspension?: boolean; - includeMutedChannels?: boolean; + /** @default true */ + excludeMutedChannels?: boolean; dbFallback: (untilId: string | null, sinceId: string | null, limit: number) => Promise, }; @@ -121,7 +122,7 @@ export class FanoutTimelineEndpointService { this.cacheService.renoteMutingsCache.fetch(ps.me.id), this.cacheService.userBlockedCache.fetch(ps.me.id), this.cacheService.userProfileCache.fetch(me.id).then(p => new Set(p.mutedInstances)), - ps.includeMutedChannels ? Promise.resolve(new Set()) : this.channelMutingService.mutingChannelsCache.fetch(me.id), + (ps.excludeMutedChannels ?? true) ? this.channelMutingService.mutingChannelsCache.fetch(me.id) : Promise.resolve(new Set()), ]); const parentFilter = filter; @@ -132,7 +133,7 @@ export class FanoutTimelineEndpointService { if (isUserRelated(note.renote, userIdsWhoMeMuting, ps.ignoreAuthorFromMute)) return false; if (!ps.ignoreAuthorFromMute && isRenote(note) && !isQuote(note) && userIdsWhoMeMutingRenotes.has(note.userId)) return false; if (isInstanceMuted(note, userMutedInstances)) return false; - if (!ps.includeMutedChannels && isChannelRelated(note, userMutedChannels)) return false; + if ((ps.excludeMutedChannels ?? true) && isChannelRelated(note, userMutedChannels)) return false; return parentFilter(note); }; diff --git a/packages/backend/src/server/api/endpoints/channels/timeline.ts b/packages/backend/src/server/api/endpoints/channels/timeline.ts index 3c55df4c67..78fdfb7476 100644 --- a/packages/backend/src/server/api/endpoints/channels/timeline.ts +++ b/packages/backend/src/server/api/endpoints/channels/timeline.ts @@ -104,7 +104,7 @@ export default class extends Endpoint { // eslint- useDbFallback: true, redisTimelines: [`channelTimeline:${channel.id}`], excludePureRenotes: false, - includeMutedChannels: true, + excludeMutedChannels: false, noteFilter: note => { // 共通機能を使うと見ているチャンネルそのものもミュートしてしまうので閲覧中のチャンネル以外を除く形にする if (note.channelId === channel.id && (note.renoteChannelId === null || note.renoteChannelId === channel.id)) return true;