Always show that bot-admin reads all messages.

A bot with any admin rights has access to messages.
This commit is contained in:
John Preston
2017-06-17 22:51:23 +03:00
parent 8fe56b9a7d
commit c3ad0ae129
8 changed files with 139 additions and 107 deletions
+2 -1
View File
@@ -274,7 +274,8 @@ void MembersBox::Inner::actionPressed(Member &row) {
})), KeepOtherLayers);
} else {
auto currentRights = _rows[_kickSelected].adminRights;
_kickBox = Ui::show(Box<EditAdminBox>(_channel, user, currentRights, base::lambda_guarded(this, [this, user](const MTPChannelAdminRights &rights) {
auto hasAdminRights = true;
_kickBox = Ui::show(Box<EditAdminBox>(_channel, user, hasAdminRights, currentRights, base::lambda_guarded(this, [this, user](const MTPChannelAdminRights &rights) {
if (_kickBox) _kickBox->closeBox();
MTP::send(MTPchannels_EditAdmin(_channel->inputChannel, user->inputUser, rights), ::rpcDone(base::lambda_guarded(this, [this, user, rights](const MTPUpdates &result, mtpRequestId req) {
if (App::main()) App::main()->sentUpdatesReceived(result);