mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-18 23:27:09 +02:00
In legacy groups admins can't remove admins.
This commit is contained in:
parent
223681d2da
commit
3cd05a34d9
1 changed files with 3 additions and 1 deletions
|
@ -359,7 +359,9 @@ bool ParticipantsAdditionalData::canRemoveUser(
|
|||
if (canRestrictUser(user)) {
|
||||
return true;
|
||||
} else if (const auto chat = _peer->asChat()) {
|
||||
return !user->isSelf() && chat->invitedByMe.contains(user);
|
||||
return !user->isSelf()
|
||||
&& chat->invitedByMe.contains(user)
|
||||
&& (chat->amCreator() || !_admins.contains(user));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue