mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-06 14:50:04 +01:00
dont show tags from cid -1
This commit is contained in:
@@ -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 };
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user