From 9353638668be63fe365a0ea6c5b5fbe7e3fce9e0 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 2 Aug 2024 15:47:03 -0400 Subject: [PATCH] fix: have note federation call .parsePost instead of firing plugin hook --- src/activitypub/mocks.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/activitypub/mocks.js b/src/activitypub/mocks.js index dadd6c36b0..eee2179fc2 100644 --- a/src/activitypub/mocks.js +++ b/src/activitypub/mocks.js @@ -303,10 +303,7 @@ Mocks.note = async (post) => { const content = await posts.getPostField(post.pid, 'content'); post.content = content; // re-send raw content - const { postData: parsed } = await plugins.hooks.fire('filter:parse.post', { - postData: post, - type: 'activitypub.note', - }); + const parsed = await posts.parsePost(post, 'activitypub.note'); post.content = sanitize(parsed.content, sanitizeConfig); post.content = posts.relativeToAbsolute(post.content, posts.urlRegex); post.content = posts.relativeToAbsolute(post.content, posts.imgRegex);