Skip to content

Node.js based forum software built for the modern web

Revert "feat: add _hooks metadata object to all hooks that have object-type params"

Barış Soner Uşaklı7c1e163d82ae
diff --git a/src/plugins/hooks.js b/src/plugins/hooks.js
index b7dc59742f..59f904d186 100644
--- a/src/plugins/hooks.js
+++ b/src/plugins/hooks.js
@@ -96,17 +96,6 @@ Hooks.fire = async function (hook, params) {
winston.warn(`[plugins] Unknown hookType: ${hookType}, hook : ${hook}`);
return;
}
-
- if (params === undefined) { // can't be simpler falsy check, empty strings can be passed e.g. filter:parse.raw
- params = {};
- }
- if (typeof params === 'object') {
- params._hook = Object.freeze({
- name: hook,
- type: hookType,
- listeners: hookList && Array.isArray(hookList) ? hookList.length : 0,
- });
- }
const result = await hookTypeToMethod[hookType](hook, hookList, params);
if (hook !== 'action:plugins.firehook' && hook !== 'filter:plugins.firehook') {