mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-04 21:15:55 +01:00
fix: #7788, fix on topic move and new post
This commit is contained in:
@@ -169,11 +169,11 @@ module.exports = function (Categories) {
|
||||
const promises = [
|
||||
db.sortedSetAdd('cid:' + cid + ':pids', postData.timestamp, postData.pid),
|
||||
db.incrObjectField('category:' + cid, 'post_count'),
|
||||
Categories.updateRecentTid(cid, postData.tid),
|
||||
];
|
||||
if (!pinned) {
|
||||
promises.push(db.sortedSetIncrBy('cid:' + cid + ':tids:posts', 1, postData.tid));
|
||||
}
|
||||
await Promise.all(promises);
|
||||
await Categories.updateRecentTidForCid(cid);
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user