disable access restriction if all owners are removed

This commit is contained in:
ansuz 2020-02-19 14:39:28 -05:00
parent f579c9b059
commit 79bc8830ef

View File

@ -224,8 +224,9 @@ commands.RM_OWNERS = function (meta, args) {
changed = true;
});
// XXX RESTRICT only owned channels can be restricted
// drop the restricted flag if there are no owners
if (meta.owners.length === 0 && meta.restricted) {
meta.restricted = false;
}
return changed;
};
@ -305,8 +306,9 @@ commands.RESET_OWNERS = function (meta, args) {
});
}
// XXX RESTRICT only owned channels can be restricted
// drop the restricted flag if there are no owners
if (meta.owners.length === 0 && meta.restricted) {
meta.restricted = false;
}
return true;
};