Reapply "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 reverts commit 8003946feb.
This commit is contained in:
Julian Lam
2024-09-17 11:58:46 -04:00
parent b04a11055f
commit d0ac5ff99f

View File

@@ -85,9 +85,9 @@ topicsAPI.create = async function (caller, data) {
socketHelpers.notifyNew(caller.uid, 'newTopic', { posts: [result.postData], topic: result.topicData });
if (!isScheduling) {
setImmediate(() => {
setTimeout(() => {
activitypubApi.create.note(caller, { pid: result.postData.pid });
});
}, 5000);
}
return result.topicData;