diff --git a/src/libclient/contactmodel.cpp b/src/libclient/contactmodel.cpp index e3673d48467450d7ea4ac7a71b5a28317ea89e67..72fe3efa1ef6d3d436c1e2ee203907471b0107a8 100644 --- a/src/libclient/contactmodel.cpp +++ b/src/libclient/contactmodel.cpp @@ -240,7 +240,8 @@ ContactModel::ContactModel(const account::Info& owner, ContactModel::~ContactModel() {} void -ContactModel::initContacts() { +ContactModel::initContacts() +{ pimpl_->fillWithJamiContacts(); } @@ -944,20 +945,21 @@ ContactModelPimpl::slotRegisteredNameFound(const QString& accountId, return; if (status == 0 /* SUCCESS */) { + QString foundName = registeredName.toLower(); std::lock_guard<std::mutex> lk(contactsMtx_); if (contacts.find(uri) != contacts.end()) { // update contact and remove temporary item - contacts[uri].registeredName = registeredName; + contacts[uri].registeredName = foundName; searchResult.clear(); } else { - nonContactLookup_[uri] = registeredName; + nonContactLookup_[uri] = foundName; if ((searchQuery != uri && searchQuery != registeredName) || searchQuery.isEmpty()) { // we are notified that a previous lookup ended return; } // Update the temporary item lrc::api::profile::Info profileInfo = {uri, "", "", profile::Type::TEMPORARY}; - searchResult[uri] = {profileInfo, registeredName, false, false}; + searchResult[uri] = {profileInfo, foundName, false, false}; } } else { {