From a0c3cd723bcdca27c3615712c28e575fab82bae9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Blin?=
 <sebastien.blin@savoirfairelinux.com>
Date: Wed, 5 Aug 2020 16:06:52 -0400
Subject: [PATCH] manager: do not delete the conference when rendez-vous has
 only one user

Change-Id: Idf1063901cf2338ff7a4f5f8aa6ecee588dcb6c3
Gitlab: #269
---
 src/manager.cpp | 19 ++++++++-----------
 1 file changed, 8 insertions(+), 11 deletions(-)

diff --git a/src/manager.cpp b/src/manager.cpp
index fbb3e147a2..db27d570d6 100644
--- a/src/manager.cpp
+++ b/src/manager.cpp
@@ -535,18 +535,15 @@ Manager::ManagerPimpl::processRemainingParticipants(Conference& conf)
         // the conference is over
         auto p = participants.begin();
         if (auto call = base_.getCallFromCallID(*p)) {
-            call->setConfId("");
             // if we are not listening to this conference and not a rendez-vous
-            auto isRdv = false;
-            if (auto acc = std::dynamic_pointer_cast<JamiAccount>(base_.getAccount(call->getAccountId())))
-                isRdv = acc->getAccountDetails()[Conf::CONFIG_ACCOUNT_ISRENDEZVOUS] == TRUE_STR;
-
-            if (!isRdv) {
-                if (current_call_id != conf.getConfID())
-                    base_.onHoldCall(call->getCallId());
-                else
-                    switchCall(call);
-            }
+            if(call->getAccount().isRendezVous())
+                return;
+
+            call->setConfId("");
+            if (current_call_id != conf.getConfID())
+                base_.onHoldCall(call->getCallId());
+            else
+                switchCall(call);
         }
 
         JAMI_DBG("No remaining participants, remove conference");
-- 
GitLab