Skip to content

Commit

Permalink
fix: remove admins/mods if they are no longer in {admin,mod}Keys
Browse files Browse the repository at this point in the history
  • Loading branch information
hackergrrl committed May 23, 2020
1 parent e233483 commit 626d65f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions views/moderation.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ module.exports = function (cabal, authDb, infoDb) {
transform: function (row, enc, next) {
var flags = row && row.flags || []
if (flags.includes('admin') && row.key === undefined &&
cabal.adminKeys.includes(row.id) && row.id !== key) {
!cabal.adminKeys.includes(row.id) && row.id !== key) {
batch.push({
type: 'remove',
id: row.id,
Expand All @@ -65,7 +65,7 @@ module.exports = function (cabal, authDb, infoDb) {
userFlags[row.id] = flags
}
if (flags.includes('mod') && row.key === undefined &&
cabal.modKeys.includes(row.id) && row.id !== key) {
!cabal.modKeys.includes(row.id) && row.id !== key) {
batch.push({
type: 'remove',
id: row.id,
Expand Down

0 comments on commit 626d65f

Please sign in to comment.