mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix(post-queue): moderatedCids is an array of numbers (#9631)
This commit is contained in:
@@ -165,13 +165,13 @@ modsController.postQueue = async function (req, res, next) {
|
|||||||
helpers.getSelectedCategory(cid),
|
helpers.getSelectedCategory(cid),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if (cid && !moderatedCids.includes(String(cid)) && !isAdminOrGlobalMod) {
|
if (cid && !moderatedCids.includes(Number(cid)) && !isAdminOrGlobalMod) {
|
||||||
return next();
|
return next();
|
||||||
}
|
}
|
||||||
|
|
||||||
postData = postData.filter(p => p &&
|
postData = postData.filter(p => p &&
|
||||||
(!categoriesData.selectedCids.length || categoriesData.selectedCids.includes(p.category.cid)) &&
|
(!categoriesData.selectedCids.length || categoriesData.selectedCids.includes(p.category.cid)) &&
|
||||||
(isAdminOrGlobalMod || moderatedCids.includes(String(p.category.cid))));
|
(isAdminOrGlobalMod || moderatedCids.includes(Number(p.category.cid))));
|
||||||
|
|
||||||
({ posts: postData } = await plugins.hooks.fire('filter:post-queue.get', {
|
({ posts: postData } = await plugins.hooks.fire('filter:post-queue.get', {
|
||||||
posts: postData,
|
posts: postData,
|
||||||
|
|||||||
Reference in New Issue
Block a user