mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
feat: als (#9749)
* feat: als * fix: up test timeout * fix: don't overwrite caller if it already exists * fix: up test timeout for psql
This commit is contained in:
committed by
GitHub
parent
156ba0958e
commit
e59d357533
@@ -96,6 +96,10 @@ Hooks.fire = async function (hook, params) {
|
||||
winston.warn(`[plugins] Unknown hookType: ${hookType}, hook : ${hook}`);
|
||||
return;
|
||||
}
|
||||
if (params && typeof params === 'object' && !params.hasOwnProperty('caller')) {
|
||||
const als = require('../als');
|
||||
params.caller = als.getStore();
|
||||
}
|
||||
const result = await hookTypeToMethod[hookType](hook, hookList, params);
|
||||
|
||||
if (hook !== 'action:plugins.firehook' && hook !== 'filter:plugins.firehook') {
|
||||
|
||||
Reference in New Issue
Block a user