mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-06-17 00:21:30 +02:00
fix: controversial posts/bests posts not showing anything
fix upgrade script so posts with negative votes are stored, a post can have 10 upvotes and 2 downvotes fix missing negative votes checks remove unnecessary pids flters since the cids are only already filtered by topics:read
This commit is contained in:
@@ -158,7 +158,7 @@ module.exports = function (Posts) {
|
||||
|
||||
bulkAdd.push([`uid:${toUid}:posts`, post.timestamp, post.pid]);
|
||||
bulkAdd.push([`cid:${post.cid}:uid:${toUid}:pids`, post.timestamp, post.pid]);
|
||||
if (post.votes > 0) {
|
||||
if (post.votes > 0 || post.votes < 0) {
|
||||
bulkAdd.push([`cid:${post.cid}:uid:${toUid}:pids:votes`, post.votes, post.pid]);
|
||||
}
|
||||
postsByUser[post.uid] = postsByUser[post.uid] || [];
|
||||
|
||||
Reference in New Issue
Block a user