diff --git a/Telegram/SourceFiles/boxes/peers/edit_participants_box.cpp b/Telegram/SourceFiles/boxes/peers/edit_participants_box.cpp index 491717754..6a68e10af 100644 --- a/Telegram/SourceFiles/boxes/peers/edit_participants_box.cpp +++ b/Telegram/SourceFiles/boxes/peers/edit_participants_box.cpp @@ -1377,13 +1377,19 @@ base::unique_qptr ParticipantsBoxController::rowContextMenu( crl::guard(this, [=] { showAdmin(user); })); } if (_additional.canRestrictUser(user)) { - const auto isGroup = _peer->isChat() || _peer->isMegagroup(); - if (isGroup) { + const auto canRestrictWithoutKick = [&] { + if (const auto chat = _peer->asChat()) { + return chat->amCreator(); + } + return _peer->isMegagroup(); + }(); + if (canRestrictWithoutKick) { result->addAction( lang(lng_context_restrict_user), crl::guard(this, [=] { showRestricted(user); })); } if (!_additional.isKicked(user)) { + const auto isGroup = _peer->isChat() || _peer->isMegagroup(); result->addAction( lang(isGroup ? lng_context_remove_from_group