mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 12:05:57 +01:00
feat: passing in types to parsePost for more specific handling by plugins
This commit is contained in:
@@ -256,6 +256,12 @@ Mocks.note = async (post) => {
|
||||
cc.add(followersUrl);
|
||||
}
|
||||
|
||||
const content = await posts.getPostField(post.pid, 'content');
|
||||
const { postData: parsed } = await plugins.hooks.fire('filter:parse.post', {
|
||||
postData: { content },
|
||||
type: 'activitypub.note',
|
||||
});
|
||||
post.content = parsed.content;
|
||||
post.content = posts.relativeToAbsolute(post.content, posts.urlRegex);
|
||||
post.content = posts.relativeToAbsolute(post.content, posts.imgRegex);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user