From 756548520401e1f920d358ad61ec1f28451173d5 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Tue, 16 Jan 2024 12:00:40 -0500 Subject: [PATCH] fix: incorrect author uid saved in topic --- src/activitypub/notes.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/activitypub/notes.js b/src/activitypub/notes.js index 41a25fc837..870a0364e1 100644 --- a/src/activitypub/notes.js +++ b/src/activitypub/notes.js @@ -86,7 +86,7 @@ Notes.assertTopic = async (uid, id) => { */ const chain = Array.from(await Notes.getParentChain(uid, id)); - const tid = chain[chain.length - 1].pid; + const { pid: tid, uid: authorId } = chain[chain.length - 1]; const members = await db.isSortedSetMembers(`tidRemote:${tid}:posts`, chain.map(p => p.pid)); if (members.every(Boolean)) { @@ -106,7 +106,7 @@ Notes.assertTopic = async (uid, id) => { await Promise.all([ db.setObject(`topicRemote:${tid}`, { tid, - uid, + uid: authorId, cid: -1, mainPid: tid, title: 'TBD',