diff --git a/Telegram/SourceFiles/boxes/peers/edit_participants_box.cpp b/Telegram/SourceFiles/boxes/peers/edit_participants_box.cpp index 02e9cdd25..76c6af11e 100644 --- a/Telegram/SourceFiles/boxes/peers/edit_participants_box.cpp +++ b/Telegram/SourceFiles/boxes/peers/edit_participants_box.cpp @@ -1457,8 +1457,6 @@ void ParticipantsBoxController::rowActionClicked( base::unique_qptr ParticipantsBoxController::rowContextMenu( QWidget *parent, not_null row) { - Expects(row->peer()->isUser()); - const auto chat = _peer->asChat(); const auto channel = _peer->asChannel(); const auto participant = row->peer(); @@ -1466,7 +1464,11 @@ base::unique_qptr ParticipantsBoxController::rowContextMenu( auto result = base::make_unique_q(parent); if (_navigation) { result->addAction( - tr::lng_context_view_profile(tr::now), + (participant->isUser() + ? tr::lng_context_view_profile + : participant->isBroadcast() + ? tr::lng_context_view_channel + : tr::lng_context_view_group)(tr::now), crl::guard(this, [=] { _navigation->showPeerInfo(participant); })); } @@ -1493,7 +1495,7 @@ base::unique_qptr ParticipantsBoxController::rowContextMenu( : tr::lng_context_promote_admin)(tr::now), crl::guard(this, [=] { showAdmin(user); })); } - if (_additional.canRestrictParticipant(participant)) { + if (user && _additional.canRestrictParticipant(participant)) { const auto canRestrictWithoutKick = [&] { if (const auto chat = _peer->asChat()) { return chat->amCreator(); @@ -1506,7 +1508,7 @@ base::unique_qptr ParticipantsBoxController::rowContextMenu( crl::guard(this, [=] { showRestricted(user); })); } } - if (_additional.canRemoveParticipant(participant)) { + if (user && _additional.canRemoveParticipant(participant)) { if (!_additional.isKicked(participant)) { const auto isGroup = _peer->isChat() || _peer->isMegagroup(); result->addAction( diff --git a/Telegram/ThirdParty/tgcalls b/Telegram/ThirdParty/tgcalls index eded7cc54..4a9de89c6 160000 --- a/Telegram/ThirdParty/tgcalls +++ b/Telegram/ThirdParty/tgcalls @@ -1 +1 @@ -Subproject commit eded7cc540123eaf26361958b9a61c65cb2f7cfc +Subproject commit 4a9de89c61882f00e0563d44516284a89874144b