From 15904526974b3d5a6e9a885649f708bf1953b87e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Tue, 25 Sep 2018 11:14:25 -0400 Subject: [PATCH] filter topics you cant read @benlubar --- src/topics/unread.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/topics/unread.js b/src/topics/unread.js index 83e2192533..275cfec69c 100644 --- a/src/topics/unread.js +++ b/src/topics/unread.js @@ -205,10 +205,11 @@ module.exports = function (Topics) { }, function (results, next) { cid = cid && cid.map(String); + results.readableCids = results.readableCids.map(String); topicData.forEach(function (topic, index) { function cidMatch(topicCid) { - return (!cid || (cid.length && cid.includes(String(topicCid)))); + return (!cid || (cid.length && cid.includes(String(topicCid)))) && results.readableCids.includes(String(topicCid)); } if (topic && topic.cid && cidMatch(topic.cid) && !blockedUids.includes(parseInt(topic.uid, 10))) {