diff --git a/daemon b/daemon index b256d6495954f929005231139cbb7aa8f8d66f92..59d063c94b00f511c331a18c073d8f145924a9fb 160000 --- a/daemon +++ b/daemon @@ -1 +1 @@ -Subproject commit b256d6495954f929005231139cbb7aa8f8d66f92 +Subproject commit 59d063c94b00f511c331a18c073d8f145924a9fb diff --git a/src/libclient/conversationmodel.cpp b/src/libclient/conversationmodel.cpp index 06d54f82179380b4d3af41a78f85ac36692fa362..43a6d2fe8d94015de3615fa0f4dc8443f98cdd01 100644 --- a/src/libclient/conversationmodel.cpp +++ b/src/libclient/conversationmodel.cpp @@ -3484,7 +3484,15 @@ ConversationModelPimpl::slotCallStatusChanged(const QString& callId, int code) if (peers.size() != 1) { continue; } - if (peers.front() == call.peerUri) { + if (peers.front() == call.peerUri.remove("ring:")) { + if (!conversation.callId.isEmpty()) { + // If outgoing and incoming happen at the same time, choose the current one. + auto call = linked.owner.callModel->getCall(conversation.callId); + qWarning() << "Double call detected" << call::to_string(call.status) << " - " << conversation.callId; + // Ignore new call in favor of existing one + if (call.status == call::Status::IN_PROGRESS) + return; + } conversation.callId = callId; // Update interaction status invalidateModel(); @@ -3569,7 +3577,8 @@ ConversationModelPimpl::addOrUpdateCallMessage(const QString& callId, } try { auto& conv = getConversationForPeerUri(from).get(); - conv.callId = callId; + if (conv.callId.isEmpty()) + conv.callId = callId; } catch (...) { return; }