Skip to content

Node.js based forum software built for the modern web

fix: update handling of Announce(Create(Note)) to also handle non-note types

Julian Lam600b1a8622c0
diff --git a/src/activitypub/inbox.js b/src/activitypub/inbox.js
index 310f09cd48..a30373209b 100644
--- a/src/activitypub/inbox.js
+++ b/src/activitypub/inbox.js
@@ -239,8 +239,8 @@ inbox.announce = async (req) => {
}
}
- // Handle case where Announce(Create(Note)) is received
- if (object.type === 'Create' && object.object.type === 'Note') {
+ // Handle case where Announce(Create(Note-ish)) is received
+ if (object.type === 'Create' && activitypub._constants.acceptedPostTypes.includes(object.object.type)) {
pid = object.object.id;
} else {
pid = object.id;