2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-30 22:25:12 +00:00

Ignore default banned rights for channel admins.

Fixes #5640.
This commit is contained in:
John Preston
2019-02-01 15:50:57 +03:00
parent 35e5c2329b
commit f0c4868b3e
2 changed files with 13 additions and 11 deletions

View File

@@ -212,7 +212,9 @@ void EditAdminBox::prepare() {
const auto chat = peer()->asChat();
const auto channel = peer()->asChannel();
const auto prepareRights = hadRights ? _oldRights : Defaults(peer());
const auto disabledByDefaults = DisabledByDefaultRestrictions(peer());
const auto disabledByDefaults = (channel && !channel->isMegagroup())
? MTPDchatAdminRights::Flags(0)
: DisabledByDefaultRestrictions(peer());
const auto filterByMyRights = canSave()
&& !hadRights
&& channel