Skip to content

Node.js based forum software built for the modern web

fix: assertTopic incorrectly creating new id if passed-in id did not match the actual object's id

Julian Lamf1b8f3fe4ffa
diff --git a/src/activitypub/notes.js b/src/activitypub/notes.js
index 2bc4f4f871..4d48fcdd95 100644
--- a/src/activitypub/notes.js
+++ b/src/activitypub/notes.js
@@ -62,6 +62,12 @@ Notes.getParentChain = async (uid, input) => {
}
} else {
let object = await activitypub.get('uid', uid, id);
+
+ // Handle incorrect id passed in
+ if (id !== object.id) {
+ return await traverse(uid, object.id);
+ }
+
object = await activitypub.mocks.post(object);
if (object) {
chain.add(object);