Skip to content

Node.js based forum software built for the modern web

fix: object reference detection in `inbox.announce`

Julian Lamd03f54ddd47f
diff --git a/src/activitypub/inbox.js b/src/activitypub/inbox.js
index 269484278c..d50a22ab9b 100644
--- a/src/activitypub/inbox.js
+++ b/src/activitypub/inbox.js
@@ -548,7 +548,7 @@ inbox.announce = async (req) => {
// Protections for non-Creates
const createish = object.type === 'Create' || activitypub._constants.acceptedPostTypes.includes(object.type);
if (!createish) {
- let id = object.object.id || object.object; // expecting object reference
+ let id = object?.object?.id || object.object; // expecting object reference
const { id: localId } = await activitypub.helpers.resolveLocalId(id);
id = localId || id;