Node.js based forum software built for the modern web
dont show tags from cid -1
Barış Soner Uşaklıf24a1a34ceee
diff --git a/src/socket.io/topics/tags.js b/src/socket.io/topics/tags.jsindex a8f86eee19..c5d2695692 100644--- a/src/socket.io/topics/tags.js+++ b/src/socket.io/topics/tags.js@@ -68,6 +68,7 @@ module.exports = function (SocketTopics) {}}data.cids = await categories.getCidsByPrivilege('categories:cid', uid, 'topics:read');+ data.cids = data.cids.filter(cid => cid !== -1);return await method(data);}@@ -106,7 +107,8 @@ module.exports = function (SocketTopics) {const start = parseInt(data.after, 10);const stop = start + 99;- const cids = await categories.getCidsByPrivilege('categories:cid', socket.uid, 'topics:read');+ let cids = await categories.getCidsByPrivilege('categories:cid', socket.uid, 'topics:read');+ cids = cids.filter(cid => cid !== -1);const tags = await topics.getCategoryTagsData(cids, start, stop);return { tags: tags.filter(Boolean), nextStart: stop + 1 };};