fix: wrap ap note creation in setImmediate to let internal hooks have a chance to wrap up first

This commit is contained in:
Julian Lam
2024-06-19 13:48:00 -04:00
parent daed74134a
commit a3c6c872b9

View File

@@ -82,7 +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) {
activitypubApi.create.note(caller, { pid: result.postData.pid }); setImmediate(() => {
activitypubApi.create.note(caller, { pid: result.postData.pid });
});
} }
return result.topicData; return result.topicData;