summaryrefslogtreecommitdiff
path: root/src/client/store.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2020-07-29 01:15:02 +0900
committersyuilo <syuilotan@yahoo.co.jp>2020-07-29 01:15:02 +0900
commit30df8ea1213013072f139aa26a635330457cf2bc (patch)
tree3edeeed1f53475f0ebc9e181295c6c91a90c9ca4 /src/client/store.ts
parentfeat(client): プラグインを無効にできるように (diff)
downloadmisskey-30df8ea1213013072f139aa26a635330457cf2bc.tar.gz
misskey-30df8ea1213013072f139aa26a635330457cf2bc.tar.bz2
misskey-30df8ea1213013072f139aa26a635330457cf2bc.zip
feat(client): AiScript: ノート書き換えAPI
Diffstat (limited to 'src/client/store.ts')
-rw-r--r--src/client/store.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/client/store.ts b/src/client/store.ts
index 67dd6ea06a..7046e10f98 100644
--- a/src/client/store.ts
+++ b/src/client/store.ts
@@ -111,6 +111,7 @@ export default () => new Vuex.Store({
postFormActions: [],
userActions: [],
noteActions: [],
+ noteViewInterruptors: [],
},
getters: {
@@ -274,6 +275,14 @@ export default () => new Vuex.Store({
}
});
},
+
+ registerNoteViewInterruptor(state, { pluginId, handler }) {
+ state.noteViewInterruptors.push({
+ handler: (note) => {
+ return state.pluginContexts.get(pluginId).execFn(handler, [utils.jsToVal(note)]);
+ }
+ });
+ },
},
actions: {