From a931f5182204e52fb07060bae4213e902996d626 Mon Sep 17 00:00:00 2001 From: Kateryna Kostiuk <kateryna.kostiuk@savoirfairelinux.com> Date: Fri, 18 Oct 2019 12:37:47 -0400 Subject: [PATCH] conference: hold call Use conference id to hold conference when other call became current Change-Id: I3846661c73c936ed0a49777761900e08f6139ab9 --- src/newcallmodel.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/newcallmodel.cpp b/src/newcallmodel.cpp index 5c3d8a88..d6b81b70 100644 --- a/src/newcallmodel.cpp +++ b/src/newcallmodel.cpp @@ -590,14 +590,11 @@ NewCallModelPimpl::setCurrentCall(const std::string& callId) // to a current conference if (it != pendingConferences_.end()) return; std::vector<std::string> filterCalls; - if (dontHoldConferences_) { - // Do not hold calls in a conference - QStringList conferences = CallManager::instance().getConferenceList(); - for (const auto& confId : conferences) { - QStringList callList = CallManager::instance().getParticipantList(confId); - foreach(const auto& callId, callList) { - filterCalls.emplace_back(callId.toStdString()); - } + QStringList conferences = CallManager::instance().getConferenceList(); + for (const auto& confId : conferences) { + QStringList callList = CallManager::instance().getParticipantList(confId); + foreach(const auto& callId, callList) { + filterCalls.emplace_back(callId.toStdString()); } } for (const auto& cid : Lrc::activeCalls()) { @@ -606,6 +603,12 @@ NewCallModelPimpl::setCurrentCall(const std::string& callId) CallManager::instance().hold(cid.c_str()); } } + if (dontHoldConferences_) { + return; + } + for (const auto& confId : conferences) { + CallManager::instance().holdConference(confId); + } } void -- GitLab