mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-03 20:45:58 +01:00
Add an index for going from a post to its replies
This commit is contained in:
@@ -137,6 +137,17 @@ module.exports = function (Posts) {
|
||||
function (next) {
|
||||
deletePostFromUsersVotes(pid, next);
|
||||
},
|
||||
function(next) {
|
||||
Posts.getPostField(pid, 'toPid', function (err, toPid) {
|
||||
if (err) {
|
||||
return next(err);
|
||||
}
|
||||
if (!parseInt(toPid, 10)) {
|
||||
return next(null);
|
||||
}
|
||||
db.sortedSetRemove('pid:' + toPid + ':replies', pid, next);
|
||||
});
|
||||
},
|
||||
function (next) {
|
||||
db.sortedSetsRemove(['posts:pid', 'posts:flagged'], pid, next);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user