Node.js based forum software built for the modern web
fix: rename api.activitypub.create.post to .note()
Julian Lam2d7ca48d42f4
diff --git a/src/api/activitypub.js b/src/api/activitypub.jsindex bb6221ab0c..af881eff5b 100644--- a/src/api/activitypub.js+++ b/src/api/activitypub.js@@ -126,7 +126,7 @@ async function buildRecipients(object, { pid, uid }) {return { targets };}-activitypubApi.create.post = enabledCheck(async (caller, { pid }) => {+activitypubApi.create.note = enabledCheck(async (caller, { pid }) => {const post = (await posts.getPostSummaryByPids([pid], caller.uid, { stripTags: false })).pop();if (!post) {return;diff --git a/src/api/topics.js b/src/api/topics.jsindex 1a693c28af..4b853afebc 100644--- a/src/api/topics.js+++ b/src/api/topics.js@@ -82,7 +82,7 @@ topicsAPI.create = async function (caller, data) {socketHelpers.notifyNew(caller.uid, 'newTopic', { posts: [result.postData], topic: result.topicData });if (!isScheduling) {- activitypubApi.create.post(caller, { pid: result.postData.pid });+ activitypubApi.create.note(caller, { pid: result.postData.pid });}return result.topicData;@@ -118,7 +118,7 @@ topicsAPI.reply = async function (caller, data) {}socketHelpers.notifyNew(caller.uid, 'newPost', result);- activitypubApi.create.post(caller, { pid: postData.pid });+ activitypubApi.create.note(caller, { pid: postData.pid });return postObj[0];};diff --git a/src/topics/scheduled.js b/src/topics/scheduled.jsindex 9ba4908322..364fa28c6f 100644--- a/src/topics/scheduled.js+++ b/src/topics/scheduled.js@@ -157,7 +157,7 @@ function federatePosts(uids, topicData) {topicData.forEach(({ mainPid: pid }, idx) => {const uid = uids[idx];- api.activitypub.create.post({ uid }, { pid });+ api.activitypub.create.note({ uid }, { pid });});}