refactor: move plugin hook methods to plugin.hooks.*

This commit is contained in:
Julian Lam
2020-11-20 16:06:26 -05:00
parent 3b1c03ed50
commit 6e2da9966e
136 changed files with 550 additions and 541 deletions

View File

@@ -55,7 +55,7 @@ module.exports = function (Posts) {
const post = await postDiffLoad(pid, since, uid);
post.content = String(post.content || '');
const result = await plugins.fireHook('filter:parse.post', { postData: post });
const result = await plugins.hooks.fire('filter:parse.post', { postData: post });
result.postData.content = translator.escape(result.postData.content);
return result.postData;
};