mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-31 02:55:58 +01:00 
			
		
		
		
	This commit is contained in:
		| @@ -92,7 +92,7 @@ Hooks.unregister = function (id, hook, method) { | |||||||
| Hooks.fire = async function (hook, params) { | Hooks.fire = async function (hook, params) { | ||||||
| 	const hookList = plugins.loadedHooks[hook]; | 	const hookList = plugins.loadedHooks[hook]; | ||||||
| 	const hookType = hook.split(':')[0]; | 	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); | 		winston.verbose('[plugins/fireHook] ' + hook); | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| @@ -102,8 +102,8 @@ Hooks.fire = async function (hook, params) { | |||||||
| 	} | 	} | ||||||
| 	const result = await hookTypeToMethod[hookType](hook, hookList, params); | 	const result = await hookTypeToMethod[hookType](hook, hookList, params); | ||||||
|  |  | ||||||
| 	if (hook !== 'action:plugins.fireHook') { | 	if (hook !== 'action:plugins.firehook') { | ||||||
| 		Hooks.fire('action:plugins.fireHook', { hook: hook, params: params }); | 		Hooks.fire('action:plugins.firehook', { hook: hook, params: params }); | ||||||
| 	} | 	} | ||||||
| 	if (result !== undefined) { | 	if (result !== undefined) { | ||||||
| 		return result; | 		return result; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user