From c608b0e8a32cfa384a3741c5b0c37dbdebb0195f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Mon, 18 Jan 2021 19:31:07 -0500 Subject: [PATCH] fix: https://github.com/NodeBB/nodebb-plugin-webhooks/issues/3 --- src/plugins/hooks.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/hooks.js b/src/plugins/hooks.js index 0ed353e946..e603bc73eb 100644 --- a/src/plugins/hooks.js +++ b/src/plugins/hooks.js @@ -92,7 +92,7 @@ Hooks.unregister = function (id, hook, method) { Hooks.fire = async function (hook, params) { const hookList = plugins.loadedHooks[hook]; const hookType = hook.split(':')[0]; - if (global.env === 'development' && hook !== 'action:plugins.fireHook') { + if (global.env === 'development' && hook !== 'action:plugins.firehook') { winston.verbose('[plugins/fireHook] ' + hook); } @@ -102,8 +102,8 @@ Hooks.fire = async function (hook, params) { } const result = await hookTypeToMethod[hookType](hook, hookList, params); - if (hook !== 'action:plugins.fireHook') { - Hooks.fire('action:plugins.fireHook', { hook: hook, params: params }); + if (hook !== 'action:plugins.firehook') { + Hooks.fire('action:plugins.firehook', { hook: hook, params: params }); } if (result !== undefined) { return result;