feat: post auto flagging on downvotes #10029 (#10367)

* feat: post auto flagging on downvotes

* fix: just get one admin
This commit is contained in:
gasoved
2022-03-04 23:38:16 +03:00
committed by GitHub
parent 56345777ce
commit 62187caa67
8 changed files with 31 additions and 9 deletions

View File

@@ -211,6 +211,10 @@ User.getAdminsandGlobalModsandModerators = async function () {
return await User.getUsersData(_.union(...results));
};
User.getFirstAdminUid = async function () {
return (await db.getSortedSetRange('group:administrators:members', 0, 0))[0];
};
User.getModeratorUids = async function () {
const cids = await categories.getAllCidsFromSet('categories:cid');
const uids = await categories.getModeratorUids(cids);