mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: rename api.activitypub.create.post to .note()
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
@@ -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];
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -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 });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user