fix: rename api.activitypub.create.post to .note()

This commit is contained in:
Julian Lam
2024-05-10 14:32:00 -04:00
parent d40d0b06ac
commit 2d7ca48d42
3 changed files with 4 additions and 4 deletions

View File

@@ -126,7 +126,7 @@ async function buildRecipients(object, { pid, uid }) {
return { targets }; 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(); const post = (await posts.getPostSummaryByPids([pid], caller.uid, { stripTags: false })).pop();
if (!post) { if (!post) {
return; return;

View File

@@ -82,7 +82,7 @@ topicsAPI.create = async function (caller, data) {
socketHelpers.notifyNew(caller.uid, 'newTopic', { posts: [result.postData], topic: result.topicData }); socketHelpers.notifyNew(caller.uid, 'newTopic', { posts: [result.postData], topic: result.topicData });
if (!isScheduling) { if (!isScheduling) {
activitypubApi.create.post(caller, { pid: result.postData.pid }); activitypubApi.create.note(caller, { pid: result.postData.pid });
} }
return result.topicData; return result.topicData;
@@ -118,7 +118,7 @@ topicsAPI.reply = async function (caller, data) {
} }
socketHelpers.notifyNew(caller.uid, 'newPost', result); socketHelpers.notifyNew(caller.uid, 'newPost', result);
activitypubApi.create.post(caller, { pid: postData.pid }); activitypubApi.create.note(caller, { pid: postData.pid });
return postObj[0]; return postObj[0];
}; };

View File

@@ -157,7 +157,7 @@ function federatePosts(uids, topicData) {
topicData.forEach(({ mainPid: pid }, idx) => { topicData.forEach(({ mainPid: pid }, idx) => {
const uid = uids[idx]; const uid = uids[idx];
api.activitypub.create.post({ uid }, { pid }); api.activitypub.create.note({ uid }, { pid });
}); });
} }