fix: incorrect topic event added when topic moved out of cid -1 (used to be a share by the user; since removed.)

This commit is contained in:
Julian Lam
2025-11-21 15:20:44 -05:00
parent aa7e078fbf
commit 2b733e4a8e

View File

@@ -283,9 +283,7 @@ module.exports = function (Topics) {
oldCid: oldCid,
}),
Topics.updateCategoryTagsCount([oldCid, cid], tags),
oldCid !== -1 ?
Topics.events.log(tid, { type: 'move', uid: data.uid, fromCid: oldCid }) :
topicTools.share(tid, data.uid),
Topics.events.log(tid, { type: 'move', uid: data.uid, fromCid: oldCid }),
]);
// Update entry in recent topics zset — must come after hash update