mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-16 18:56:15 +01:00
fix recent replies
This commit is contained in:
@@ -103,7 +103,10 @@ module.exports = function(Categories) {
|
|||||||
|
|
||||||
pids = pids.concat(topicPids).filter(function(pid, index, array) {
|
pids = pids.concat(topicPids).filter(function(pid, index, array) {
|
||||||
return !!pid && array.indexOf(pid) === index;
|
return !!pid && array.indexOf(pid) === index;
|
||||||
});
|
}).sort(function(a, b) {
|
||||||
|
return b - a;
|
||||||
|
}).slice(0, count);
|
||||||
|
|
||||||
callback(null, pids);
|
callback(null, pids);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -177,7 +177,7 @@ module.exports = function(Topics) {
|
|||||||
return next(err);
|
return next(err);
|
||||||
}
|
}
|
||||||
latestPid = pids[0];
|
latestPid = pids[0];
|
||||||
isDeleted = deleted;
|
isDeleted = parseInt(deleted, 10) === 1;
|
||||||
++index;
|
++index;
|
||||||
next();
|
next();
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user