mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-12 22:09:25 +08:00
contact_list: setContacts must call contactAdded()
Because setContacts() just change the contact list but never notify the client, the client can't know the contacts from the new account. Change-Id: I02e27f3b768dd7def661d3568a796a91eaa78751 Gitlab: #230
This commit is contained in:
@ -76,7 +76,6 @@ ContactList::addContact(const dht::InfoHash& h, bool confirmed)
|
||||
trust_.setCertificateStatus(hStr, tls::TrustStore::PermissionStatus::ALLOWED);
|
||||
saveContacts();
|
||||
callbacks_.contactAdded(hStr, c->second.confirmed);
|
||||
//emitSignal<DRing::ConfigurationSignal::ContactAdded>(account_.get().getAccountID(), hStr, c->second.confirmed);
|
||||
//syncDevices();
|
||||
return true;
|
||||
}
|
||||
@ -99,7 +98,6 @@ ContactList::removeContact(const dht::InfoHash& h, bool ban)
|
||||
saveTrustRequests();
|
||||
saveContacts();
|
||||
callbacks_.contactRemoved(uri, ban);
|
||||
//emitSignal<DRing::ConfigurationSignal::ContactRemoved>(account_.get().getAccountID(), uri, ban);
|
||||
//syncDevices();
|
||||
return true;
|
||||
}
|
||||
@ -131,6 +129,9 @@ ContactList::setContacts(const std::map<dht::InfoHash, Contact>& contacts)
|
||||
{
|
||||
contacts_ = contacts;
|
||||
saveContacts();
|
||||
// Set contacts is used when creating a new device, so just announce new contacts
|
||||
for (auto& peer : contacts)
|
||||
callbacks_.contactAdded(peer.first.toString(), peer.second.confirmed);
|
||||
}
|
||||
|
||||
void
|
||||
|
Reference in New Issue
Block a user