feat(frontend): プラグインを用いて疑似的にミュートできるようにする (#12135)

* feat: mute note using plugin

* Update CHANGELOG

---------

Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
This commit is contained in:
taichan 2023-10-28 15:50:46 +09:00 committed by GitHub
parent 481db8aba4
commit e73e21851e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 3 deletions

View file

@ -183,9 +183,11 @@ let note = $ref(deepClone(props.note));
// plugin
if (noteViewInterruptors.length > 0) {
onMounted(async () => {
let result = deepClone(note);
let result:Misskey.entities.Note | null = deepClone(note);
for (const interruptor of noteViewInterruptors) {
result = await interruptor.handler(result);
if (result === null) return isDeleted.value = true;
}
note = result;
});