diff --git a/src/categories/index.js b/src/categories/index.js index 5789c25e37..45ad28704a 100644 --- a/src/categories/index.js +++ b/src/categories/index.js @@ -99,6 +99,10 @@ Categories.getModerators = async function (cid) { }; Categories.getModeratorUids = async function (cids) { + // Only check active categories + const disabled = (await Categories.getCategoriesFields(cids, ['disabled'])).map(obj => obj.disabled); + cids = cids.filter((_, idx) => !disabled[idx]); + const groupNames = cids.reduce((memo, cid) => { memo.push(`cid:${cid}:privileges:moderate`); memo.push(`cid:${cid}:privileges:groups:moderate`);