From 830aab66bbe5ea2ad55a9c7110b3b65ff579422f Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 27 Nov 2024 13:58:41 -0500 Subject: [PATCH] fix: thrown exception from failed note assertion --- src/activitypub/inbox.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/activitypub/inbox.js b/src/activitypub/inbox.js index eddc8026bd..5af54cfa4c 100644 --- a/src/activitypub/inbox.js +++ b/src/activitypub/inbox.js @@ -308,11 +308,12 @@ inbox.announce = async (req) => { return; } - ({ tid } = await activitypub.notes.assert(0, pid, { cid, skipChecks: true })); // checks skipped; done above. - if (!tid) { + const assertion = await activitypub.notes.assert(0, pid, { cid, skipChecks: true }); // checks skipped; done above. + if (!assertion) { return; } + ({ tid } = assertion); await topics.updateLastPostTime(tid, timestamp); await activitypub.notes.updateLocalRecipients(pid, { to, cc }); await activitypub.notes.syncUserInboxes(tid);