From e9f868f60e90d3d52652e73e232fdbeaf3327678 Mon Sep 17 00:00:00 2001 From: Christophe Deschamps Date: Thu, 30 Jan 2025 16:39:44 +0100 Subject: [PATCH] Fix contact list not updating when adding a contact with no SIP address --- Linphone/core/search/MagicSearchList.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Linphone/core/search/MagicSearchList.cpp b/Linphone/core/search/MagicSearchList.cpp index bf3d28d04..09fe5994d 100644 --- a/Linphone/core/search/MagicSearchList.cpp +++ b/Linphone/core/search/MagicSearchList.cpp @@ -57,7 +57,8 @@ void MagicSearchList::setSelf(QSharedPointer me) { auto haveContact = std::find_if(mList.begin(), mList.end(), [friendCore](const QSharedPointer &item) { auto itemCore = item.objectCast(); - return itemCore->getDefaultAddress() == friendCore->getDefaultAddress() || + return itemCore->getDefaultAddress().length() > 0 && + itemCore->getDefaultAddress() == friendCore->getDefaultAddress() || itemCore->getFriendModel()->getFriend() == friendCore->getFriendModel()->getFriend(); }); if (haveContact == mList.end()) {