fix: NaN on ap post delete

This commit is contained in:
Barış Soner Uşaklı
2026-02-26 21:51:49 -05:00
parent c6dce656e0
commit 53b208b769

View File

@@ -137,7 +137,7 @@ module.exports = function (Posts) {
}
topicTasks.push(topics.updateTeaser(tid));
topicTasks.push(topics.updateLastPostTimeFromLastPid(tid));
const postsByUid = _.groupBy(posts, p => parseInt(p.uid, 10));
const postsByUid = _.groupBy(posts, p => String(p.uid));
for (const [uid, uidPosts] of Object.entries(postsByUid)) {
zsetIncrBulk.push([`tid:${tid}:posters`, -uidPosts.length, uid]);
}