From d0ac5ff99fb4769ce76037c8dd274e26fcd32773 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Tue, 17 Sep 2024 11:58:46 -0400 Subject: [PATCH] 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 8003946feb2397c44faae25ef702fa09d3e61f7a. --- src/api/topics.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/topics.js b/src/api/topics.js index 4f63301c57..72926ee525 100644 --- a/src/api/topics.js +++ b/src/api/topics.js @@ -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;