mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-25 07:08:11 +00:00
set correct SIP address in chatroom when phone number linked
This commit is contained in:
parent
eca35807b2
commit
0b48ad284b
1 changed files with 8 additions and 2 deletions
|
|
@ -84,8 +84,14 @@
|
|||
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
[tableView deselectRowAtIndexPath:indexPath animated:YES];
|
||||
LinphoneChatRoom *room = linphone_core_get_chat_room_from_uri(
|
||||
LC, ((NSString *)[_contacts.allKeys objectAtIndex:indexPath.row]).UTF8String);
|
||||
NSString *uri;
|
||||
LinphoneAddress *addr = [LinphoneUtils normalizeSipOrPhoneAddress:[_contacts.allKeys objectAtIndex:indexPath.row]];
|
||||
if (addr) {
|
||||
uri = [NSString stringWithUTF8String:linphone_address_as_string(addr)];
|
||||
} else {
|
||||
uri = [_contacts.allKeys objectAtIndex:indexPath.row];
|
||||
}
|
||||
LinphoneChatRoom *room = linphone_core_get_chat_room_from_uri(LC, uri.UTF8String);
|
||||
if (!room) {
|
||||
[PhoneMainView.instance popCurrentView];
|
||||
UIAlertController *errView = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"Invalid address", nil)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue