Skip to content
Snippets Groups Projects
Commit 6e0fab28 authored by Sébastien Blin's avatar Sébastien Blin Committed by Nicolas Jager
Browse files

contactmodel: registeredName is not the alias


Change-Id: I33b929f3b88e62c7231ce1aa07fd608f51f3876f
Reviewed-by: default avatarNicolas Jäger <nicolas.jager@savoirfairelinux.com>
parent 2417a376
No related branches found
No related tags found
No related merge requests found
...@@ -415,7 +415,7 @@ ContactModelPimpl::fillsWithRINGContacts() { ...@@ -415,7 +415,7 @@ ContactModelPimpl::fillsWithRINGContacts() {
contact::Info contactInfo; contact::Info contactInfo;
contactInfo.profileInfo = profileInfo; contactInfo.profileInfo = profileInfo;
contactInfo.registeredName = cm->bestName().toStdString(); contactInfo.registeredName = cm->registeredName().toStdString();
contacts.emplace(contactUri.toStdString(), contactInfo); contacts.emplace(contactUri.toStdString(), contactInfo);
database::getOrInsertProfile(db, contactUri.toStdString(), database::getOrInsertProfile(db, contactUri.toStdString(),
...@@ -474,7 +474,8 @@ ContactModelPimpl::addToContacts(ContactMethod* cm, const profile::Type& type) ...@@ -474,7 +474,8 @@ ContactModelPimpl::addToContacts(ContactMethod* cm, const profile::Type& type)
to_string(linked.owner.profileInfo.type)); to_string(linked.owner.profileInfo.type));
} }
auto contactInfo = database::buildContactFromProfileId(db, contactId); auto contactInfo = database::buildContactFromProfileId(db, contactId);
contactInfo.registeredName = cm->bestName().toStdString(); contactInfo.registeredName = cm->registeredName().toStdString();
contactInfo.isPresent = cm->isPresent(); contactInfo.isPresent = cm->isPresent();
contactInfo.profileInfo.type = type; // Because PENDING should not be stored in the database contactInfo.profileInfo.type = type; // Because PENDING should not be stored in the database
auto iter = contacts.find(contactInfo.profileInfo.uri); auto iter = contacts.find(contactInfo.profileInfo.uri);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment