Skip to content
Snippets Groups Projects
Commit 428756e5 authored by Sébastien Blin's avatar Sébastien Blin
Browse files

contactmodel: do not emit contactAdded for already added contact

Change-Id: I226c804181e88b47d5d361d84caaf0db23e09e6c
parent 04a8dfa4
No related branches found
No related tags found
No related merge requests found
......@@ -810,8 +810,16 @@ ContactModelPimpl::slotContactAdded(const QString& accountId, const QString& con
if (accountId != linked.owner.id)
return;
auto contact = contacts.find(contactUri);
if (contact != contacts.end() && contact->profileInfo.type == profile::Type::PENDING)
Q_EMIT behaviorController.trustRequestTreated(linked.owner.id, contactUri);
if (contact != contacts.end()) {
if (contact->isBanned) {
// Continue
} else if (contact->profileInfo.type == profile::Type::PENDING) {
Q_EMIT behaviorController.trustRequestTreated(linked.owner.id, contactUri);
// Continue
} else {
return;
}
}
// for jams account we already have profile with avatar, use it to save to vCard
bool isJamsAccount = !linked.owner.confProperties.managerUri.isEmpty();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment