mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-11 08:25:46 +01:00
refactor: move plugin hook methods to plugin.hooks.*
This commit is contained in:
@@ -67,7 +67,7 @@ module.exports = function (Topics) {
|
||||
});
|
||||
await Promise.all(postData.map(p => posts.parsePost(p)));
|
||||
|
||||
const { tags } = await plugins.fireHook('filter:teasers.configureStripTags', { tags: utils.stripTags.concat(['img']) });
|
||||
const { tags } = await plugins.hooks.fire('filter:teasers.configureStripTags', { tags: utils.stripTags.concat(['img']) });
|
||||
|
||||
var teasers = topics.map(function (topic, index) {
|
||||
if (!topic) {
|
||||
@@ -82,7 +82,7 @@ module.exports = function (Topics) {
|
||||
return tidToPost[topic.tid];
|
||||
});
|
||||
|
||||
const result = await plugins.fireHook('filter:teasers.get', { teasers: teasers, uid: uid });
|
||||
const result = await plugins.hooks.fire('filter:teasers.get', { teasers: teasers, uid: uid });
|
||||
return result.teasers;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user