2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Add support for admins without additional rights.

This commit is contained in:
John Preston
2021-02-18 19:25:17 +04:00
parent 433866f2c5
commit 018232680f
3 changed files with 4 additions and 3 deletions

View File

@@ -329,7 +329,7 @@ void EditAdminBox::prepare() {
if (!_saveCallback) {
return;
}
const auto newFlags = value()
const auto newFlags = (value() | ChatAdminRight::f_other)
& ((!channel || channel->amCreator())
? ~Flags(0)
: channel->adminRights());

View File

@@ -773,7 +773,7 @@ EditFlagsControl<MTPDchatBannedRights::Flags> CreateEditRestrictions(
EditFlagsControl<MTPDchatAdminRights::Flags> CreateEditAdminRights(
QWidget *parent,
rpl::producer<QString> header,
rpl::producer<QString> header,
MTPDchatAdminRights::Flags rights,
std::map<MTPDchatAdminRights::Flags, QString> disabledMessages,
bool isGroup,