Node.js based forum software built for the modern web
fix: guard against missing to/cc
Julian Lam1d5f490de0c0
diff --git a/src/activitypub/inbox.js b/src/activitypub/inbox.jsindex a4b4579f4d..a3a6648aa3 100644--- a/src/activitypub/inbox.js+++ b/src/activitypub/inbox.js@@ -78,7 +78,7 @@ inbox.create = async (req) => {inbox.update = async (req) => {const { actor, object } = req.body;- const isPublic = [...object.to, ...object.cc].includes(activitypub._constants.publicAddress);+ const isPublic = [...(object.to || []), ...(object.cc || [])].includes(activitypub._constants.publicAddress);// Origin checkingconst actorHostname = new URL(actor).hostname;