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

@@ -29,7 +29,7 @@ module.exports = function (SocketPosts) {
canFlag: privileges.posts.canFlag(data.pid, socket.uid),
flagged: flags.exists('post', data.pid, socket.uid), // specifically, whether THIS calling user flagged
bookmarked: posts.hasBookmarked(data.pid, socket.uid),
tools: plugins.fireHook('filter:post.tools', { pid: data.pid, uid: socket.uid, tools: [] }),
tools: plugins.hooks.fire('filter:post.tools', { pid: data.pid, uid: socket.uid, tools: [] }),
postSharing: social.getActivePostSharing(),
history: posts.diffs.exists(data.pid),
canViewInfo: privileges.global.can('view:users:info', socket.uid),