From 9bbade37dec0ba98be0e9b20f7a6f45cff59a9b0 Mon Sep 17 00:00:00 2001 From: trilene Date: Fri, 1 Jan 2021 08:46:08 -0500 Subject: Fix call answered on another device --- src/CallManager.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/CallManager.cpp') diff --git a/src/CallManager.cpp b/src/CallManager.cpp index 9864b203..f725d49f 100644 --- a/src/CallManager.cpp +++ b/src/CallManager.cpp @@ -351,12 +351,15 @@ CallManager::handleEvent(const RoomEvent &callAnswerEvent) callAnswerEvent.content.call_id, callAnswerEvent.sender); - if (!isOnCall() && callAnswerEvent.sender == utils::localUser().toStdString() && + if (callAnswerEvent.sender == utils::localUser().toStdString() && callid_ == callAnswerEvent.content.call_id) { - emit ChatPage::instance()->showNotification("Call answered on another device."); - stopRingtone(); - haveCallInvite_ = false; - emit newInviteState(); + if (!isOnCall()) { + emit ChatPage::instance()->showNotification( + "Call answered on another device."); + stopRingtone(); + haveCallInvite_ = false; + emit newInviteState(); + } return; } -- cgit 1.5.1