From 2b3f17e982fa96d1996063e4b45c1faeb0843b01 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Fri, 29 Sep 2023 13:09:45 +0300 Subject: [PATCH] Removed call button from history with service user. --- .../SourceFiles/history/view/history_view_top_bar_widget.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/history/view/history_view_top_bar_widget.cpp b/Telegram/SourceFiles/history/view/history_view_top_bar_widget.cpp index 577ebaff8c..c026ab9c76 100644 --- a/Telegram/SourceFiles/history/view/history_view_top_bar_widget.cpp +++ b/Telegram/SourceFiles/history/view/history_view_top_bar_widget.cpp @@ -1101,7 +1101,9 @@ void TopBarWidget::updateControlsVisibility() { const auto callsEnabled = [&] { if (const auto peer = _activeChat.key.peer()) { if (const auto user = peer->asUser()) { - return !user->isSelf() && !user->isBot(); + return !user->isSelf() + && !user->isBot() + && !peer->isServiceUser(); } } return false;