From 28490f3a5892ee7ca7587be579e83829689d34ce Mon Sep 17 00:00:00 2001 From: taichan <40626578+tai-cha@users.noreply.github.com> Date: Sat, 1 Feb 2025 13:48:18 +0900 Subject: [PATCH] =?UTF-8?q?Fix(frontend):=20=E3=83=AF=E3=83=BC=E3=83=89?= =?UTF-8?q?=E3=83=9F=E3=83=A5=E3=83=BC=E3=83=88=E3=81=8Cnull=E3=81=AE?= =?UTF-8?q?=E6=99=82=E3=81=AB=E3=82=82=E3=82=BB=E3=83=B3=E3=82=B7=E3=83=86?= =?UTF-8?q?=E3=82=A3=E3=83=96=E3=83=9F=E3=83=A5=E3=83=BC=E3=83=88=E3=81=8C?= =?UTF-8?q?=E8=A1=8C=E3=82=8F=E3=82=8C=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= =?UTF-8?q?=20(#15364)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix(frontend): ワードミュートがnullの時にもセンシティブミュートが行われるように * Add ChangeLog --- CHANGELOG.md | 2 +- packages/frontend/src/components/MkNote.vue | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 08dec985a..07f392782 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ - ### Client -- +- Fix: 一部環境でセンシティブなファイルを含むノートの非表示が効かない問題 ### Server - Fix: 個別お知らせページのmetaタグ出力の条件が間違っていたのを修正 diff --git a/packages/frontend/src/components/MkNote.vue b/packages/frontend/src/components/MkNote.vue index 52d048574..a23ff9b48 100644 --- a/packages/frontend/src/components/MkNote.vue +++ b/packages/frontend/src/components/MkNote.vue @@ -304,16 +304,16 @@ function checkMute(noteToCheck: Misskey.entities.Note, mutedWords: Array | undefined | null, checkOnly: false): Array | false | 'sensitiveMute'; */ function checkMute(noteToCheck: Misskey.entities.Note, mutedWords: Array | undefined | null, checkOnly = false): Array | false | 'sensitiveMute' { - if (mutedWords == null) return false; + if (mutedWords != null) { + const result = checkWordMute(noteToCheck, $i, mutedWords); + if (Array.isArray(result)) return result; - const result = checkWordMute(noteToCheck, $i, mutedWords); - if (Array.isArray(result)) return result; + const replyResult = noteToCheck.reply && checkWordMute(noteToCheck.reply, $i, mutedWords); + if (Array.isArray(replyResult)) return replyResult; - const replyResult = noteToCheck.reply && checkWordMute(noteToCheck.reply, $i, mutedWords); - if (Array.isArray(replyResult)) return replyResult; - - const renoteResult = noteToCheck.renote && checkWordMute(noteToCheck.renote, $i, mutedWords); - if (Array.isArray(renoteResult)) return renoteResult; + const renoteResult = noteToCheck.renote && checkWordMute(noteToCheck.renote, $i, mutedWords); + if (Array.isArray(renoteResult)) return renoteResult; + } if (checkOnly) return false;