mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-03-21 03:30:42 +00:00
fix
This commit is contained in:
@@ -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<MiNote[]>,
|
||||
};
|
||||
|
||||
@@ -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<string>()) : this.channelMutingService.mutingChannelsCache.fetch(me.id),
|
||||
(ps.excludeMutedChannels ?? true) ? this.channelMutingService.mutingChannelsCache.fetch(me.id) : Promise.resolve(new Set<string>()),
|
||||
]);
|
||||
|
||||
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);
|
||||
};
|
||||
|
||||
@@ -104,7 +104,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // 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;
|
||||
|
||||
Reference in New Issue
Block a user