Check whether the user can read the replies and allow filtering the reply count in plugins

This commit is contained in:
Ben Lubar
2016-11-08 18:43:26 -06:00
parent ecef0c6ad5
commit 5937fefa39
2 changed files with 10 additions and 1 deletions

View File

@@ -127,6 +127,9 @@ SocketPosts.getReplies = function (socket, pid, callback) {
function (next) {
posts.getPidsFromSet('pid:' + pid + ':replies', 0, -1, false, next);
},
function (pids, next) {
privileges.posts.filter('read', pids, socket.uid, next);
},
function (pids, next) {
async.parallel({
posts: function (next) {