mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
fix: assertTopic incorrectly creating new id if passed-in id did not match the actual object's id
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user