From 4cc7ee6501f12bbe4738fcbbefb9782bb5f29189 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Tue, 23 Jan 2024 10:31:13 -0500 Subject: [PATCH] fix: note assertion on Create(Note) and Update(Note) to use instance key instead of uid 1's user key --- src/activitypub/inbox.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/activitypub/inbox.js b/src/activitypub/inbox.js index d6598e39eb..9434c29688 100644 --- a/src/activitypub/inbox.js +++ b/src/activitypub/inbox.js @@ -15,8 +15,8 @@ inbox.create = async (req) => { const postData = await activitypub.mocks.post(object); if (postData) { - await activitypub.notes.assert(1, [postData]); - const tid = await activitypub.notes.assertTopic(1, postData.pid); + await activitypub.notes.assert(0, [postData]); + const tid = await activitypub.notes.assertTopic(0, postData.pid); winston.info(`[activitypub/inbox] Parsing note ${postData.pid} into topic ${tid}`); } else { winston.warn('[activitypub/inbox] Received object was not a note'); @@ -28,7 +28,7 @@ inbox.update = async (req) => { const postData = await activitypub.mocks.post(object); if (postData) { - await activitypub.notes.assert(1, [postData], { update: true }); + await activitypub.notes.assert(0, [postData], { update: true }); winston.info(`[activitypub/inbox] Updating note ${postData.pid}`); } else { winston.warn('[activitypub/inbox] Received object was not a note');