This commit is contained in:
Barış Soner Uşaklı
2026-02-24 10:21:52 -05:00
parent cdc8eeb8b9
commit 003e6d0775

View File

@@ -122,7 +122,10 @@ module.exports = function (Posts) {
if (posts.length && posts[0]) {
const topicData = posts[0].topic;
const newPostCount = topicData.postcount - posts.length;
topicPostCountTasks.push(['topics:posts', newPostCount, tid]);
const isRemoteCid = !utils.isNumber(topicData.cid) || topicData.cid === -1;
if (!isRemoteCid) {
topicPostCountTasks.push(['topics:posts', newPostCount, tid]);
}
if (!topicData.pinned) {
zsetIncrBulk.push([`cid:${topicData.cid}:tids:posts`, -posts.length, tid]);
}