Node.js based forum software built for the modern web
fix: note assertion on Create(Note) and Update(Note) to use instance key instead of uid 1's user key
Julian Lam4cc7ee6501f1
diff --git a/src/activitypub/inbox.js b/src/activitypub/inbox.jsindex 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');