fix: dont load cid=-1 in tag filter dropdown

This commit is contained in:
Barış Soner Uşaklı
2024-06-20 10:40:33 -04:00
parent 7fada44bf2
commit 7d679db28e

View File

@@ -79,6 +79,7 @@ module.exports = function (SocketTopics) {
cids = await privileges.categories.filterCids('topics:read', data.cids, socket.uid); cids = await privileges.categories.filterCids('topics:read', data.cids, socket.uid);
} else { // if no cids passed in get all cids we can read } else { // if no cids passed in get all cids we can read
cids = await categories.getCidsByPrivilege('categories:cid', socket.uid, 'topics:read'); cids = await categories.getCidsByPrivilege('categories:cid', socket.uid, 'topics:read');
cids = cids.filter(cid => cid !== -1);
} }
let tags = []; let tags = [];