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
......@@ -590,8 +590,6 @@ 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);
......@@ -599,13 +597,18 @@ NewCallModelPimpl::setCurrentCall(const std::string& callId)
filterCalls.emplace_back(callId.toStdString());
}
}
}
for (const auto& cid : Lrc::activeCalls()) {
auto filtered = std::find(filterCalls.begin(), filterCalls.end(), cid) != filterCalls.end();
if (cid != callId && !filtered) {
CallManager::instance().hold(cid.c_str());
}
}
if (dontHoldConferences_) {
return;
}
for (const auto& confId : conferences) {
CallManager::instance().holdConference(confId);
}
}
void
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment