From 818624e05110d4339293dccdbb3b748b5c6e9f88 Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 30 Dec 2020 16:14:13 +0400 Subject: [PATCH] Don't allow kicking yourself from legacy group. --- 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 1e95ac2d7..dd4e3587a 100644 --- a/Telegram/SourceFiles/boxes/peers/edit_participants_box.cpp +++ b/Telegram/SourceFiles/boxes/peers/edit_participants_box.cpp @@ -358,7 +358,7 @@ bool ParticipantsAdditionalData::canRemoveUser( if (canRestrictUser(user)) { return true; } else if (const auto chat = _peer->asChat()) { - return chat->invitedByMe.contains(user); + return !user->isSelf() && chat->invitedByMe.contains(user); } return false; }