From f1b8f3fe4ffab3698cee2e8f213444252f273450 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 8 Feb 2024 11:33:27 -0500 Subject: [PATCH] fix: assertTopic incorrectly creating new id if passed-in id did not match the actual object's id --- src/activitypub/notes.js | 6 ++++++ 1 file changed, 6 insertions(+) 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);