Check if user is a channel before showing Mention user (#295)

This commit is contained in:
blank X 2022-01-22 00:59:16 +00:00 committed by GitHub
parent c94e7b4cbc
commit 55e1a74d12
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1554,7 +1554,7 @@ base::unique_qptr<Ui::PopupMenu> ParticipantsBoxController::rowContextMenu(
user);
}), &st::menuIconSearch);
if (const auto openedPeer = mainwidget->peer()) {
if (openedPeer->canWrite()) {
if (openedPeer->canWrite() && participant->isUser()) {
result->addAction(
ktr("ktg_profile_mention_user"),
crl::guard(this, [=] { mainwidget->mentionUser(user); }),