diff --git a/src/newcallmodel.cpp b/src/newcallmodel.cpp index 5c3d8a88944feac46de343dbb3a45f16fa842d16..d6b81b70d995a2067b108ef0d89ad732b3251112 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