From 961534763426a8c5c2a7b91932fe3ec0e297155b Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 27 Apr 2023 15:23:06 +0400 Subject: [PATCH] This should allow calling another authed account. --- Telegram/SourceFiles/calls/calls_instance.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Telegram/SourceFiles/calls/calls_instance.cpp b/Telegram/SourceFiles/calls/calls_instance.cpp index 456b6d767..d205ab4b0 100644 --- a/Telegram/SourceFiles/calls/calls_instance.cpp +++ b/Telegram/SourceFiles/calls/calls_instance.cpp @@ -589,6 +589,15 @@ void Instance::handleCallUpdate( // May be a repeated phoneCallRequested update from getDifference. return; } + if (inCall() + && _currentCall->type() == Call::Type::Outgoing + && _currentCall->user()->id == session->userPeerId() + && (peerFromUser(phoneCall.vparticipant_id()) + == _currentCall->user()->session().userPeerId())) { + // Ignore call from the same running app, other account. + return; + } + const auto &config = session->serverConfig(); if (inCall() || inGroupCall() || !user || user->isSelf()) { const auto flags = phoneCall.is_video()