mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: wrap ap note creation in setImmediate to let internal hooks have a chance to wrap up first
This commit is contained in:
@@ -82,7 +82,9 @@ 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.note(caller, { pid: result.postData.pid });
|
setImmediate(() => {
|
||||||
|
activitypubApi.create.note(caller, { pid: result.postData.pid });
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return result.topicData;
|
return result.topicData;
|
||||||
|
|||||||
Reference in New Issue
Block a user