Skip to content

Node.js based forum software built for the modern web

fix: only call syncUserInboxes on post create if local uid creates post in cid -1

Julian Lam45d2e628ddde
diff --git a/src/topics/create.js b/src/topics/create.js
index ac360abe6d..f1f6fd570e 100644
--- a/src/topics/create.js
+++ b/src/topics/create.js
@@ -269,7 +269,9 @@ module.exports = function (Topics) {
Topics.syncBacklinks(postData),
Topics.markAsRead([tid], uid),
]);
- activitypub.notes.syncUserInboxes(tid, uid);
+ if (utils.isNumber(postOwner) && postData.category.cid === -1) {
+ activitypub.notes.syncUserInboxes(tid, uid);
+ }
// Returned data is a superset of post summary data
postData.user = userInfo;