mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-28 17:46:16 +01:00
fix: change setImmediate to a 5s timeout to give plugins (or anything waiting for the return value of the API call) a chance to finish execution
This commit is contained in:
@@ -82,9 +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) {
|
||||||
setImmediate(() => {
|
setTimeout(() => {
|
||||||
activitypubApi.create.note(caller, { pid: result.postData.pid });
|
activitypubApi.create.note(caller, { pid: result.postData.pid });
|
||||||
});
|
}, 5000);
|
||||||
}
|
}
|
||||||
|
|
||||||
return result.topicData;
|
return result.topicData;
|
||||||
|
|||||||
Reference in New Issue
Block a user