Fix contact list not updating when adding a contact with no SIP address

This commit is contained in:
Christophe Deschamps 2025-01-30 16:39:44 +01:00
parent 5c9ab21356
commit e9f868f60e

View file

@ -57,7 +57,8 @@ void MagicSearchList::setSelf(QSharedPointer<MagicSearchList> me) {
auto haveContact =
std::find_if(mList.begin(), mList.end(), [friendCore](const QSharedPointer<QObject> &item) {
auto itemCore = item.objectCast<FriendCore>();
return itemCore->getDefaultAddress() == friendCore->getDefaultAddress() ||
return itemCore->getDefaultAddress().length() > 0 &&
itemCore->getDefaultAddress() == friendCore->getDefaultAddress() ||
itemCore->getFriendModel()->getFriend() == friendCore->getFriendModel()->getFriend();
});
if (haveContact == mList.end()) {