Hide "Remove" context action for participants-groups.

This commit is contained in:
John Preston 2021-06-07 19:15:10 +04:00
parent a1957fe5c0
commit f1f7330bf6

View file

@ -1278,7 +1278,8 @@ base::unique_qptr<Ui::PopupMenu> Members::Controller::createRowContextMenu(
&& chat->canBanMembers()
&& !chat->admins.contains(user));
} else if (const auto channel = _peer->asChannel()) {
return channel->canRestrictParticipant(participantPeer);
return !participantPeer->isMegagroup() // That's the creator.
&& channel->canRestrictParticipant(participantPeer);
}
return false;
}();