diff --git a/src/conversationmodel.cpp b/src/conversationmodel.cpp index cf3416fe984f291e53a8a3af6f4ed6960cb1854d..ff92720250fb2dfb6e9656a654d89e3b162cb08e 100644 --- a/src/conversationmodel.cpp +++ b/src/conversationmodel.cpp @@ -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,7 +1952,11 @@ ConversationModelPimpl::slotCallAddedToConference(const QString& callId, const Q if (conversation.callId == callId || conversation.confId == confId) { conversation.confId = confId; dirtyConversations = {true, true}; - emit linked.selectConversation(conversation.uid); + + // Refresh the conference status only if attached + MapStringString confDetails = CallManager::instance().getConferenceDetails(confId); + if (confDetails["STATE"] == "ACTIVE_ATTACHED") + emit linked.selectConversation(conversation.uid); } } } diff --git a/src/newcallmodel.cpp b/src/newcallmodel.cpp index ec7a1912aa1549b931b5e75ee6be8ce7b463d1cf..8bf3d008fd85ef91c0592f97576b73800eb8d36f 100644 --- a/src/newcallmodel.cpp +++ b/src/newcallmodel.cpp @@ -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