From bd5edc55aa3437af1d3f92d0f98125ae27c3c3cf Mon Sep 17 00:00:00 2001 From: Baris Usakli Date: Wed, 2 Aug 2017 13:45:00 -0400 Subject: [PATCH] closes #5086 --- src/socket.io/helpers.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/socket.io/helpers.js b/src/socket.io/helpers.js index 9eedab2fb0..0f158cd080 100644 --- a/src/socket.io/helpers.js +++ b/src/socket.io/helpers.js @@ -89,10 +89,13 @@ SocketHelpers.sendNotificationToPostOwner = function (pid, fromuid, command, not }, function (_postData, next) { postData = _postData; - privileges.posts.can('read', pid, postData.uid, next); + async.parallel({ + canRead: async.apply(privileges.posts.can, 'read', pid, postData.uid), + isIgnoring: async.apply(topics.isIgnoring, [postData.tid], postData.uid), + }, next); }, - function (canRead, next) { - if (!canRead || !postData.uid || fromuid === parseInt(postData.uid, 10)) { + function (results, next) { + if (!results.canRead || results.isIgnoring[0] || !postData.uid || fromuid === parseInt(postData.uid, 10)) { return; } async.parallel({