From 335b2e5f1208b0dbdc65736b693e41b9b98fb114 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Blin?=
 <sebastien.blin@savoirfairelinux.com>
Date: Mon, 6 Dec 2021 10:54:19 -0500
Subject: [PATCH] lrcinstance: reverse incorrect method

withVideo should check if the call got video

Change-Id: I5b7e13b7269735bea5f4ecc63a98687cb93bb4c1
GitLab: #617
---
 src/lrcinstance.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/lrcinstance.cpp b/src/lrcinstance.cpp
index 2e42534a6..8f01703d7 100644
--- a/src/lrcinstance.cpp
+++ b/src/lrcinstance.cpp
@@ -151,13 +151,13 @@ LRCInstance::hasActiveCall(bool withVideo)
         for (const auto& accountId : accountList) {
             auto& accountInfo = accountModel().getAccountInfo(accountId);
             if (withVideo) {
-                if (accountInfo.callModel->hasCall(callId))
-                    return true;
-            } else {
                 if (accountInfo.callModel->hasCall(callId)) {
                     auto call = accountInfo.callModel->getCall(callId);
                     result |= !(call.isAudioOnly || call.videoMuted);
                 }
+            } else {
+                if (accountInfo.callModel->hasCall(callId))
+                    return true;
             }
         }
     }
-- 
GitLab