Skip to content
Snippets Groups Projects
Commit a931f518 authored by Kateryna Kostiuk's avatar Kateryna Kostiuk Committed by Andreas Traczyk
Browse files

conference: hold call

Use conference id to hold conference when other call became current

Change-Id: I3846661c73c936ed0a49777761900e08f6139ab9
parent fde8f56b
No related branches found
No related tags found
No related merge requests found
...@@ -590,8 +590,6 @@ NewCallModelPimpl::setCurrentCall(const std::string& callId) ...@@ -590,8 +590,6 @@ NewCallModelPimpl::setCurrentCall(const std::string& callId)
// to a current conference // to a current conference
if (it != pendingConferences_.end()) return; if (it != pendingConferences_.end()) return;
std::vector<std::string> filterCalls; std::vector<std::string> filterCalls;
if (dontHoldConferences_) {
// Do not hold calls in a conference
QStringList conferences = CallManager::instance().getConferenceList(); QStringList conferences = CallManager::instance().getConferenceList();
for (const auto& confId : conferences) { for (const auto& confId : conferences) {
QStringList callList = CallManager::instance().getParticipantList(confId); QStringList callList = CallManager::instance().getParticipantList(confId);
...@@ -599,13 +597,18 @@ NewCallModelPimpl::setCurrentCall(const std::string& callId) ...@@ -599,13 +597,18 @@ NewCallModelPimpl::setCurrentCall(const std::string& callId)
filterCalls.emplace_back(callId.toStdString()); filterCalls.emplace_back(callId.toStdString());
} }
} }
}
for (const auto& cid : Lrc::activeCalls()) { for (const auto& cid : Lrc::activeCalls()) {
auto filtered = std::find(filterCalls.begin(), filterCalls.end(), cid) != filterCalls.end(); auto filtered = std::find(filterCalls.begin(), filterCalls.end(), cid) != filterCalls.end();
if (cid != callId && !filtered) { if (cid != callId && !filtered) {
CallManager::instance().hold(cid.c_str()); CallManager::instance().hold(cid.c_str());
} }
} }
if (dontHoldConferences_) {
return;
}
for (const auto& confId : conferences) {
CallManager::instance().holdConference(confId);
}
} }
void void
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment