diff --git a/packages/frontend/src/components/MkNote.vue b/packages/frontend/src/components/MkNote.vue index ffbf658ea6..6349df2e30 100644 --- a/packages/frontend/src/components/MkNote.vue +++ b/packages/frontend/src/components/MkNote.vue @@ -240,14 +240,23 @@ const urls = $computed(() => parsed ? extractUrlFromMfm(parsed) : null); const isLong = shouldCollapsed(appearNote, urls ?? []); const collapsed = ref(appearNote.cw == null && isLong); const isDeleted = ref(false); -const muted = ref($i ? checkWordMute(appearNote, $i, $i.mutedWords) : false); -const hardMuted = ref(props.withHardMute && ($i ? checkWordMute(appearNote, $i, $i.hardMutedWords) : false)); +const muted = ref(checkMute(appearNote, $i?.mutedWords)); +const hardMuted = ref(props.withHardMute && checkMute(appearNote, $i?.hardMutedWords)); const translation = ref(null); const translating = ref(false); const showTicker = (defaultStore.state.instanceTicker === 'always') || (defaultStore.state.instanceTicker === 'remote' && appearNote.user.instance); const canRenote = computed(() => ['public', 'home'].includes(appearNote.visibility) || (appearNote.visibility === 'followers' && appearNote.userId === $i.id)); let renoteCollapsed = $ref(defaultStore.state.collapseRenotes && isRenote && (($i && ($i.id === note.userId || $i.id === appearNote.userId)) || (appearNote.myReaction != null))); +function checkMute(note: Misskey.entities.Note, mutedWords: Array | undefined | null): boolean { + if (mutedWords == null) return false; + + if (checkWordMute(note, $i, mutedWords)) return true; + if (note.reply && checkWordMute(note.reply, $i, mutedWords)) return true; + if (note.renote && checkWordMute(note.renote, $i, mutedWords)) return true; + return false; +} + const keymap = { 'r': () => reply(true), 'e|a|plus': () => react(true),