mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 17:16:14 +01:00
Add an index for going from a post to its replies
This commit is contained in:
@@ -82,6 +82,12 @@ module.exports = function (Posts) {
|
||||
function (next) {
|
||||
db.sortedSetAdd('posts:pid', timestamp, postData.pid, next);
|
||||
},
|
||||
function (next) {
|
||||
if (!postData.toPid) {
|
||||
return next(null);
|
||||
}
|
||||
db.sortedSetAdd('pid:' + postData.toPid + ':replies', timestamp, postData.pid, next);
|
||||
},
|
||||
function (next) {
|
||||
db.incrObjectField('global', 'postCount', next);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user