From 003e6d0775ba48ffdb5bd76a0e8eb380aedc4fa8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Tue, 24 Feb 2026 10:21:52 -0500 Subject: [PATCH] fix: closes #14010 --- src/posts/delete.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/posts/delete.js b/src/posts/delete.js index ba637ccff5..aa76bc5f5f 100644 --- a/src/posts/delete.js +++ b/src/posts/delete.js @@ -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]); }