Node.js based forum software built for the modern web
fix: wrap ap note creation in setImmediate to let internal hooks have a chance to wrap up first
Julian Lama3c6c872b9e2
diff --git a/src/api/topics.js b/src/api/topics.jsindex 4b853afebc..21d7111c62 100644--- a/src/api/topics.js+++ b/src/api/topics.js@@ -82,7 +82,9 @@ topicsAPI.create = async function (caller, data) {socketHelpers.notifyNew(caller.uid, 'newTopic', { posts: [result.postData], topic: result.topicData });if (!isScheduling) {- activitypubApi.create.note(caller, { pid: result.postData.pid });+ setImmediate(() => {+ activitypubApi.create.note(caller, { pid: result.postData.pid });+ });}return result.topicData;