From 7f2c276b6a4a707bc76b52afd9ee2905b1fd9d4d Mon Sep 17 00:00:00 2001 From: Benoit Martins Date: Mon, 20 Jan 2025 13:17:39 +0100 Subject: [PATCH] Fix phone number linked to SIP address --- Linphone/Contacts/ContactsManager.swift | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Linphone/Contacts/ContactsManager.swift b/Linphone/Contacts/ContactsManager.swift index 5b882a94e..df963ff77 100644 --- a/Linphone/Contacts/ContactsManager.swift +++ b/Linphone/Contacts/ContactsManager.swift @@ -139,13 +139,11 @@ final class ContactsManager: ObservableObject { self.friendList?.removeDelegate(delegate: friendListDelegate) } self.friendListDelegate = FriendListDelegateStub(onNewSipAddressDiscovered: { (_: FriendList, linphoneFriend: Friend, sipUri: String) in - var addedAvatarListModel: [ContactAvatarModel] = [] linphoneFriend.phoneNumbers.forEach { phone in - let address = core.interpretUrl(url: phone, applyInternationalPrefix: true) - + let address = try? Factory.Instance.createAddress(addr: sipUri) let presence = linphoneFriend.getPresenceModelForUriOrTel(uriOrTel: address?.asStringUriOnly() ?? "") - if address != nil && presence != nil { + if address != nil { linphoneFriend.edit() linphoneFriend.addAddress(address: address!) linphoneFriend.done()