fix(frontend/aiscript): nullを返すnote_view_intrruptorが動作しない問題を修正 (#16977)

* fix(frontend/aiscript): nullを返すnote_view_intrruptorが動作しない問題を修正

* Update Changelog
This commit is contained in:
かっこかり 2025-12-13 19:08:02 +09:00 committed by GitHub
parent cb03f3f013
commit 36d404818d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 16 additions and 5 deletions

View File

@ -9,6 +9,7 @@
- Fix: 削除されたノートのリノートが正しく動作されない問題を修正 - Fix: 削除されたノートのリノートが正しく動作されない問題を修正
- Fix: チャンネルオーナーが削除済みの時にチャンネルのヘッダーメニューが表示されない不具合を修正 - Fix: チャンネルオーナーが削除済みの時にチャンネルのヘッダーメニューが表示されない不具合を修正
- Fix: ドライブで登録日以外でソートする場合は月でグループ化して表示しないように - Fix: ドライブで登録日以外でソートする場合は月でグループ化して表示しないように
- Fix: `null` を返す note_view_intrruptor プラグインが動作しない問題を修正
### Server ### Server
- Fix: ジョブキューでSentryが有効にならない問題を修正 - Fix: ジョブキューでSentryが有効にならない問題を修正

View File

@ -5,7 +5,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<template> <template>
<div <div
v-if="!hardMuted && muted === false" v-if="!hardMuted && !hideByPlugin && muted === false"
ref="rootEl" ref="rootEl"
v-hotkey="keymap" v-hotkey="keymap"
:class="[$style.root, { [$style.showActionsOnlyHover]: prefer.s.showNoteActionsOnlyHover, [$style.skipRender]: prefer.s.skipNoteRender }]" :class="[$style.root, { [$style.showActionsOnlyHover]: prefer.s.showNoteActionsOnlyHover, [$style.skipRender]: prefer.s.skipNoteRender }]"
@ -161,7 +161,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</div> </div>
</article> </article>
</div> </div>
<div v-else-if="!hardMuted" :class="$style.muted" @click="muted = false"> <div v-else-if="!hardMuted && !hideByPlugin" :class="$style.muted" @click="muted = false">
<I18n v-if="muted === 'sensitiveMute'" :src="i18n.ts.userSaysSomethingSensitive" tag="small"> <I18n v-if="muted === 'sensitiveMute'" :src="i18n.ts.userSaysSomethingSensitive" tag="small">
<template #name> <template #name>
<MkA v-user-preview="appearNote.userId" :to="userPage(appearNote.user)"> <MkA v-user-preview="appearNote.userId" :to="userPage(appearNote.user)">
@ -270,6 +270,7 @@ let note = deepClone(props.note);
// plugin // plugin
const noteViewInterruptors = getPluginHandlers('note_view_interruptor'); const noteViewInterruptors = getPluginHandlers('note_view_interruptor');
const hideByPlugin = ref(false);
if (noteViewInterruptors.length > 0) { if (noteViewInterruptors.length > 0) {
let result: Misskey.entities.Note | null = deepClone(note); let result: Misskey.entities.Note | null = deepClone(note);
for (const interruptor of noteViewInterruptors) { for (const interruptor of noteViewInterruptors) {
@ -279,7 +280,11 @@ if (noteViewInterruptors.length > 0) {
console.error(err); console.error(err);
} }
} }
note = result as Misskey.entities.Note; if (result == null) {
hideByPlugin.value = true;
} else {
note = result as Misskey.entities.Note;
}
} }
const isRenote = Misskey.note.isPureRenote(note); const isRenote = Misskey.note.isPureRenote(note);

View File

@ -5,7 +5,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<template> <template>
<div <div
v-if="!muted && !isDeleted" v-if="!muted && !hideByPlugin && !isDeleted"
ref="rootEl" ref="rootEl"
v-hotkey="keymap" v-hotkey="keymap"
:class="$style.root" :class="$style.root"
@ -294,6 +294,7 @@ let note = deepClone(props.note);
// plugin // plugin
const noteViewInterruptors = getPluginHandlers('note_view_interruptor'); const noteViewInterruptors = getPluginHandlers('note_view_interruptor');
const hideByPlugin = ref(false);
if (noteViewInterruptors.length > 0) { if (noteViewInterruptors.length > 0) {
let result: Misskey.entities.Note | null = deepClone(note); let result: Misskey.entities.Note | null = deepClone(note);
for (const interruptor of noteViewInterruptors) { for (const interruptor of noteViewInterruptors) {
@ -303,7 +304,11 @@ if (noteViewInterruptors.length > 0) {
console.error(err); console.error(err);
} }
} }
note = result as Misskey.entities.Note; if (result == null) {
hideByPlugin.value = true;
} else {
note = result as Misskey.entities.Note;
}
} }
const isRenote = Misskey.note.isPureRenote(note); const isRenote = Misskey.note.isPureRenote(note);