mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-29 17:29:20 +00:00
fix no presence model when add a new contact
This commit is contained in:
parent
aba528ede5
commit
03ebd79ace
1 changed files with 15 additions and 0 deletions
|
|
@ -85,6 +85,21 @@
|
|||
}
|
||||
PhoneMainView.instance.currentName = _contact.displayName;
|
||||
_nameLabel.text = PhoneMainView.instance.currentName;
|
||||
|
||||
// fix no sipaddresses in contact.friend
|
||||
const MSList *sips = linphone_friend_get_addresses(_contact.friend);
|
||||
while (sips) {
|
||||
linphone_friend_remove_address(_contact.friend, sips->data);
|
||||
sips = sips->next;
|
||||
}
|
||||
|
||||
for (NSString *sipAddr in _contact.sipAddresses) {
|
||||
LinphoneAddress *addr = linphone_core_interpret_url(LC, sipAddr.UTF8String);
|
||||
if (addr) {
|
||||
linphone_friend_add_address(_contact.friend, addr);
|
||||
linphone_address_destroy(addr);
|
||||
}
|
||||
}
|
||||
[LinphoneManager.instance.fastAddressBook saveContact:_contact];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue