Node.js based forum software built for the modern web
fix: better handle null return from notes.assert
Julian Lamcbfc8d252dd5
diff --git a/src/activitypub/inbox.js b/src/activitypub/inbox.jsindex 44be7cc293..1e7134c6de 100644--- a/src/activitypub/inbox.js+++ b/src/activitypub/inbox.js@@ -36,8 +36,10 @@ inbox.create = async (req) => {throw new Error('[[error:activitypub.not-implemented]]');}- const { tid, count } = await activitypub.notes.assert(0, object);- winston.verbose(`[activitypub/inbox] Parsing ${count} notes into topic ${tid}`);+ const response = await activitypub.notes.assert(0, object);+ if (response) {+ winston.verbose(`[activitypub/inbox] Parsing ${response.count} notes into topic ${response.tid}`);+ }};inbox.update = async (req) => {