mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 14:05:46 +01:00
feat: send pids into filter:post.getFields hook
This commit is contained in:
@@ -21,7 +21,11 @@ module.exports = function (Posts) {
|
||||
} else {
|
||||
postData = await db.getObjects(keys);
|
||||
}
|
||||
const result = await plugins.fireHook('filter:post.getFields', { posts: postData, fields: fields });
|
||||
const result = await plugins.fireHook('filter:post.getFields', {
|
||||
pids: pids,
|
||||
posts: postData,
|
||||
fields: fields,
|
||||
});
|
||||
result.posts.forEach(post => modifyPost(post, fields));
|
||||
return Array.isArray(result.posts) ? result.posts : null;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user