mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-21 07:50:37 +01:00
fix: defer federation of new topics when topic is scheduled, tie activitypub api module to global enable toggle
This commit is contained in:
@@ -80,7 +80,10 @@ topicsAPI.create = async function (caller, data) {
|
||||
socketHelpers.emitToUids('event:new_post', { posts: [result.postData] }, [caller.uid]);
|
||||
socketHelpers.emitToUids('event:new_topic', result.topicData, [caller.uid]);
|
||||
socketHelpers.notifyNew(caller.uid, 'newTopic', { posts: [result.postData], topic: result.topicData });
|
||||
activitypubApi.create.post(caller, { pid: result.postData.pid });
|
||||
|
||||
if (!isScheduling) {
|
||||
activitypubApi.create.post(caller, { pid: result.postData.pid });
|
||||
}
|
||||
|
||||
return result.topicData;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user