Commit c5132486 authored by Sébastien Blin's avatar Sébastien Blin Committed by Adrien Béraud

rendezvous: the host can change the layout

until we can set another account as the master

Change-Id: Ia4f6d72a4341d036dd20c60d06cb171b236bdcf7
parent 1b7de38d
......@@ -613,6 +613,12 @@ ConversationModel::selectConversation(const QString& uid) const
callEnded = call.status == call::Status::ENDED;
} catch (...) {}
}
if (!conversation.confId.isEmpty()
&& owner.confProperties.isRendezVous) {
// If we are on a rendez vous account and we select the conversation,
// attach to the call.
CallManager::instance().unholdConference(conversation.confId);
}
if (not callEnded and not conversation.confId.isEmpty()) {
emit pimpl_->behaviorController.showCallView(owner.id, conversation);
......@@ -1946,6 +1952,10 @@ ConversationModelPimpl::slotCallAddedToConference(const QString& callId, const Q
if (conversation.callId == callId || conversation.confId == confId) {
conversation.confId = confId;
dirtyConversations = {true, true};
// Refresh the conference status only if attached
MapStringString confDetails = CallManager::instance().getConferenceDetails(confId);
if (confDetails["STATE"] == "ACTIVE_ATTACHED")
emit linked.selectConversation(conversation.uid);
}
}
......
......@@ -705,11 +705,12 @@ NewCallModelPimpl::slotIncomingCall(const QString& accountId, const QString& cal
if (linked.owner.id != accountId) {
return;
}
if (linked.owner.confProperties.isRendezVous) {
// Do not notify for calls if rendez vous because it's in a detached
// mode and auto answer is managed by the daemon
return;
}
// TODO: uncomment this. For now, the rendez-vous account is showing calls
//if (linked.owner.confProperties.isRendezVous) {
// // Do not notify for calls if rendez vous because it's in a detached
// // mode and auto answer is managed by the daemon
// return;
//}
// do not use auto here (QDBusPendingReply<MapStringString>)
MapStringString callDetails = CallManager::instance().getCallDetails(callId);
......@@ -775,8 +776,10 @@ NewCallModelPimpl::slotCallStateChanged(const QString& callId, const QString& st
|| previousStatus == call::Status::OUTGOING_RINGING) {
if (previousStatus == call::Status::INCOMING_RINGING
&& linked.owner.profileInfo.type != profile::Type::SIP)
&& linked.owner.profileInfo.type != profile::Type::SIP
&& !linked.owner.confProperties.isRendezVous) { // TODO remove this when we want to not show calls in rendez-vous
linked.setCurrentCall(callId);
}
call->startTime = std::chrono::steady_clock::now();
emit linked.callStarted(callId);
sendProfile(callId);
......@@ -861,6 +864,14 @@ NewCallModelPimpl::slotOnConferenceInfosUpdated(const QString& confId, const Vec
}
emit linked.onParticipantsChanged(confId);
// TODO: remove when the rendez-vous UI will be done
// For now, the rendez-vous account can see ongoing calls
// And must be notified when a new
QStringList callList = CallManager::instance().getParticipantList(confId);
foreach(const auto& call, callList) {
emit linked.callAddedToConference(call, confId);
}
}
bool
......
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