Node.js based forum software built for the modern web
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
Julian Lam7fada44bf2cc
diff --git a/src/api/topics.js b/src/api/topics.jsindex 21d7111c62..2ca2977766 100644--- a/src/api/topics.js+++ b/src/api/topics.js@@ -82,9 +82,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;