From 9062691aa27c6202959cb66803bf4ba819ef419e Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Sat, 12 Oct 2024 22:49:09 -0400 Subject: [PATCH] fix: defer postdata retrieval --- src/activitypub/inbox.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/activitypub/inbox.js b/src/activitypub/inbox.js index 06a9d09111..da75f23627 100644 --- a/src/activitypub/inbox.js +++ b/src/activitypub/inbox.js @@ -91,10 +91,10 @@ inbox.update = async (req) => { switch (object.type) { case 'Note': { - const postData = await activitypub.mocks.post(object); const exists = await posts.exists(object.id); try { if (exists) { + const postData = await activitypub.mocks.post(object); await posts.edit(postData); const isDeleted = await posts.getPostField(object.id, 'deleted'); if (isDeleted) {