Skip to content

Node.js based forum software built for the modern web

fix: thrown exception from failed note assertion

Julian Lamf7a294a7a44f
diff --git a/src/activitypub/inbox.js b/src/activitypub/inbox.js
index a017e42ab9..46a71ae659 100644
--- a/src/activitypub/inbox.js
+++ b/src/activitypub/inbox.js
@@ -315,11 +315,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);