mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-06 18:26:37 +02:00
refactor: move plugin hook methods to plugin.hooks.*
This commit is contained in:
@@ -48,7 +48,7 @@ Posts.getPostsByPids = async function (pids, uid) {
|
||||
let posts = await Posts.getPostsData(pids);
|
||||
posts = await Promise.all(posts.map(p => Posts.parsePost(p)));
|
||||
posts = await user.blocks.filter(uid, posts);
|
||||
const data = await plugins.fireHook('filter:post.getPosts', { posts: posts, uid: uid });
|
||||
const data = await plugins.hooks.fire('filter:post.getPosts', { posts: posts, uid: uid });
|
||||
if (!data || !Array.isArray(data.posts)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user