mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
Fix phone number linked to SIP address
This commit is contained in:
parent
9b31eb3d99
commit
7f2c276b6a
1 changed files with 2 additions and 4 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue