From 2b5d61ad36e96c46ff46793004e3ebc9d59535cb Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 7 Apr 2022 16:49:38 +0400 Subject: [PATCH] Update tgcalls library. Fixes #24173. --- Telegram/SourceFiles/calls/calls_call.cpp | 2 ++ Telegram/SourceFiles/history/history_widget.cpp | 2 +- Telegram/ThirdParty/tgcalls | 2 +- Telegram/cmake/lib_tgcalls.cmake | 8 ++++++++ 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/calls/calls_call.cpp b/Telegram/SourceFiles/calls/calls_call.cpp index dd075f82d..72f621ed0 100644 --- a/Telegram/SourceFiles/calls/calls_call.cpp +++ b/Telegram/SourceFiles/calls/calls_call.cpp @@ -37,6 +37,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL namespace tgcalls { class InstanceImpl; class InstanceV2Impl; +class InstanceV2_4_0_0Impl; class InstanceImplLegacy; void SetLegacyGlobalServerConfig(const std::string &serverConfig); } // namespace tgcalls @@ -52,6 +53,7 @@ const auto kDefaultVersion = "2.4.4"_q; const auto Register = tgcalls::Register(); const auto RegisterV2 = tgcalls::Register(); +const auto RegisterV240 = tgcalls::Register(); const auto RegisterLegacy = tgcalls::Register(); void AppendEndpoint( diff --git a/Telegram/SourceFiles/history/history_widget.cpp b/Telegram/SourceFiles/history/history_widget.cpp index 50b4faafc..41c279ab7 100644 --- a/Telegram/SourceFiles/history/history_widget.cpp +++ b/Telegram/SourceFiles/history/history_widget.cpp @@ -4440,7 +4440,7 @@ void HistoryWidget::updateSendButtonType() { } bool HistoryWidget::updateCmdStartShown() { - const auto bot = (_peer && _peer->asUser()->isBot()) + const auto bot = (_peer && _peer->isUser() && _peer->asUser()->isBot()) ? _peer->asUser() : nullptr; bool cmdStartShown = false; diff --git a/Telegram/ThirdParty/tgcalls b/Telegram/ThirdParty/tgcalls index 6e6f09259..365f19aa5 160000 --- a/Telegram/ThirdParty/tgcalls +++ b/Telegram/ThirdParty/tgcalls @@ -1 +1 @@ -Subproject commit 6e6f09259d62eb3d1a64ca8ca93b4cbc9bdc53c7 +Subproject commit 365f19aa577b480e424651a67f90f12d56379e11 diff --git a/Telegram/cmake/lib_tgcalls.cmake b/Telegram/cmake/lib_tgcalls.cmake index e367fa624..0b4064910 100644 --- a/Telegram/cmake/lib_tgcalls.cmake +++ b/Telegram/cmake/lib_tgcalls.cmake @@ -55,6 +55,10 @@ PRIVATE VideoCaptureInterfaceImpl.h VideoCapturerInterface.h + v2/ContentNegotiation.cpp + v2/ContentNegotiation.h + v2/InstanceV2ReferenceImpl.cpp + v2/InstanceV2ReferenceImpl.h v2/InstanceV2Impl.cpp v2/InstanceV2Impl.h v2/NativeNetworkingImpl.cpp @@ -63,6 +67,10 @@ PRIVATE v2/Signaling.h v2/SignalingEncryption.cpp v2/SignalingEncryption.h + v2_4_0_0/InstanceV2_4_0_0Impl.cpp + v2_4_0_0/InstanceV2_4_0_0Impl.h + v2_4_0_0/Signaling_4_0_0.cpp + v2_4_0_0/Signaling_4_0_0.h # Desktop capturer desktop_capturer/DesktopCaptureSource.h