fix: properly bypass word mute check if signed out

This commit is contained in:
naskya 2023-10-19 14:41:16 +09:00
parent 0b8b4ea48d
commit fd3d788aad
No known key found for this signature in database
GPG key ID: 164DFF24E2D40139
4 changed files with 4 additions and 4 deletions

View file

@ -359,7 +359,7 @@ const isDeleted = ref(false);
const muted = ref( const muted = ref(
getWordSoftMute( getWordSoftMute(
note.value, note.value,
$i.id, $i?.id,
defaultStore.state.mutedWords, defaultStore.state.mutedWords,
defaultStore.state.mutedLangs, defaultStore.state.mutedLangs,
), ),

View file

@ -235,7 +235,7 @@ const isDeleted = ref(false);
const muted = ref( const muted = ref(
getWordSoftMute( getWordSoftMute(
note.value, note.value,
$i.id, $i?.id,
defaultStore.state.mutedWords, defaultStore.state.mutedWords,
defaultStore.state.mutedLangs, defaultStore.state.mutedLangs,
), ),

View file

@ -268,7 +268,7 @@ const isDeleted = ref(false);
const muted = ref( const muted = ref(
getWordSoftMute( getWordSoftMute(
note.value, note.value,
$i.id, $i?.id,
defaultStore.state.mutedWords, defaultStore.state.mutedWords,
defaultStore.state.mutedLangs, defaultStore.state.mutedLangs,
), ),

View file

@ -79,7 +79,7 @@ export function getWordSoftMute(
mutedWords: Array<string | string[]>, mutedWords: Array<string | string[]>,
mutedLangs: Array<string | string[]>, mutedLangs: Array<string | string[]>,
): Muted { ): Muted {
if (note.userId === meId) return NotMuted; if (meId == null || note.userId === meId) return NotMuted;
if (mutedWords.length > 0) { if (mutedWords.length > 0) {
const noteMuted = checkWordMute(note, mutedWords); const noteMuted = checkWordMute(note, mutedWords);