Skip to content
Snippets Groups Projects
Unverified Commit 19c5c27c authored by Sébastien Blin's avatar Sébastien Blin
Browse files

newcallmodel: ignore potential ring://

Change-Id: I4500a864c5cc65f357121a90907fd2261bff594e
parent 8d737130
No related branches found
No related tags found
No related merge requests found
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
#include "vcard.h" #include "vcard.h"
#include "video/renderer.h" #include "video/renderer.h"
#include "typedefs.h" #include "typedefs.h"
#include "uri.h"
// Ring daemon // Ring daemon
#include <media_const.h> #include <media_const.h>
...@@ -206,10 +207,13 @@ NewCallModel::~NewCallModel() ...@@ -206,10 +207,13 @@ NewCallModel::~NewCallModel()
const call::Info& const call::Info&
NewCallModel::getCallFromURI(const QString& uri, bool notOver) const NewCallModel::getCallFromURI(const QString& uri, bool notOver) const
{ {
// peer url = ring:uri or sip number // For a NON SIP account the scheme can be ring:. Sometimes it can miss, and will be certainly
auto url = (owner.profileInfo.type != profile::Type::SIP && !uri.contains("ring:")) ? "ring:" + uri : uri; // replaced by jami://.
// Just make the comparaison ignoring the scheme and check the rest.
auto uriObj = URI(uri);
for (const auto& call: pimpl_->calls) { for (const auto& call: pimpl_->calls) {
if (call.second->peerUri == url) { auto contactUri = URI(call.second->peerUri);
if (uriObj.userinfo() == contactUri.userinfo() and uriObj.hostname() == contactUri.hostname()) {
if (!notOver || !call::isTerminating(call.second->status)) if (!notOver || !call::isTerminating(call.second->status))
return *call.second; return *call.second;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment