mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-03 19:11:22 +01:00
fix: closes #14010
This commit is contained in:
@@ -122,7 +122,10 @@ module.exports = function (Posts) {
|
|||||||
if (posts.length && posts[0]) {
|
if (posts.length && posts[0]) {
|
||||||
const topicData = posts[0].topic;
|
const topicData = posts[0].topic;
|
||||||
const newPostCount = topicData.postcount - posts.length;
|
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) {
|
if (!topicData.pinned) {
|
||||||
zsetIncrBulk.push([`cid:${topicData.cid}:tids:posts`, -posts.length, tid]);
|
zsetIncrBulk.push([`cid:${topicData.cid}:tids:posts`, -posts.length, tid]);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user