From 3b4563772ed80f84d0381cc00f581216e0311d55 Mon Sep 17 00:00:00 2001 From: John Preston Date: Sat, 31 Aug 2019 14:25:02 +0300 Subject: [PATCH] Disable edit self restrictions in UI. --- Telegram/SourceFiles/boxes/peers/edit_participants_box.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/boxes/peers/edit_participants_box.cpp b/Telegram/SourceFiles/boxes/peers/edit_participants_box.cpp index 20834b6c7..801f34b9d 100644 --- a/Telegram/SourceFiles/boxes/peers/edit_participants_box.cpp +++ b/Telegram/SourceFiles/boxes/peers/edit_participants_box.cpp @@ -342,7 +342,7 @@ bool ParticipantsAdditionalData::canAddOrEditAdmin( bool ParticipantsAdditionalData::canRestrictUser( not_null user) const { - if (!canEditAdmin(user)) { + if (!canEditAdmin(user) || user->isSelf()) { return false; } else if (const auto chat = _peer->asChat()) { return chat->canBanMembers();