fix(frontend): Plugin:register_note_view_interruptor()によるノートの書き換えが機能しない問題を修正
Fix #16180
This commit is contained in:
parent
b5767c315a
commit
9a3219f12e
|
@ -12,6 +12,7 @@
|
||||||
- Fix: コントロールパネルのファイル欄などのデザインが崩れている問題を修正
|
- Fix: コントロールパネルのファイル欄などのデザインが崩れている問題を修正
|
||||||
- Fix: ユーザーの検索結果を追加で読み込むことができない問題を修正
|
- Fix: ユーザーの検索結果を追加で読み込むことができない問題を修正
|
||||||
- Fix: タッチ操作時にチャートのツールチップが消えなくなる場合がある問題を修正
|
- Fix: タッチ操作時にチャートのツールチップが消えなくなる場合がある問題を修正
|
||||||
|
- Fix: Plugin:register_note_view_interruptor()によるノートの書き換えが機能しない問題を修正
|
||||||
|
|
||||||
### Server
|
### Server
|
||||||
- Feat: 全てのチャットメッセージを既読にするAPIを追加(chat/read-all)
|
- Feat: 全てのチャットメッセージを既読にするAPIを追加(chat/read-all)
|
||||||
|
|
|
@ -268,17 +268,15 @@ let note = deepClone(props.note);
|
||||||
// plugin
|
// plugin
|
||||||
const noteViewInterruptors = getPluginHandlers('note_view_interruptor');
|
const noteViewInterruptors = getPluginHandlers('note_view_interruptor');
|
||||||
if (noteViewInterruptors.length > 0) {
|
if (noteViewInterruptors.length > 0) {
|
||||||
onMounted(async () => {
|
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) {
|
try {
|
||||||
try {
|
result = await interruptor.handler(result!) as Misskey.entities.Note | null;
|
||||||
result = await interruptor.handler(result!) as Misskey.entities.Note | null;
|
} catch (err) {
|
||||||
} catch (err) {
|
console.error(err);
|
||||||
console.error(err);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
note = result as Misskey.entities.Note;
|
}
|
||||||
});
|
note = result as Misskey.entities.Note;
|
||||||
}
|
}
|
||||||
|
|
||||||
const isRenote = Misskey.note.isPureRenote(note);
|
const isRenote = Misskey.note.isPureRenote(note);
|
||||||
|
|
|
@ -289,17 +289,15 @@ let note = deepClone(props.note);
|
||||||
// plugin
|
// plugin
|
||||||
const noteViewInterruptors = getPluginHandlers('note_view_interruptor');
|
const noteViewInterruptors = getPluginHandlers('note_view_interruptor');
|
||||||
if (noteViewInterruptors.length > 0) {
|
if (noteViewInterruptors.length > 0) {
|
||||||
onMounted(async () => {
|
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) {
|
try {
|
||||||
try {
|
result = await interruptor.handler(result!) as Misskey.entities.Note | null;
|
||||||
result = await interruptor.handler(result!) as Misskey.entities.Note | null;
|
} catch (err) {
|
||||||
} catch (err) {
|
console.error(err);
|
||||||
console.error(err);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
note = result as Misskey.entities.Note;
|
}
|
||||||
});
|
note = result as Misskey.entities.Note;
|
||||||
}
|
}
|
||||||
|
|
||||||
const isRenote = Misskey.note.isPureRenote(note);
|
const isRenote = Misskey.note.isPureRenote(note);
|
||||||
|
|
Loading…
Reference in New Issue