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()