From ff8f3d2da0b76e6f49fbcff7bf99b162bc32c72f Mon Sep 17 00:00:00 2001 From: Benjamin Reis Date: Tue, 7 Feb 2017 10:54:16 +0100 Subject: [PATCH] Display address linked to phone number when creating a cat conversation when it's possible --- Classes/ChatConversationCreateTableView.m | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Classes/ChatConversationCreateTableView.m b/Classes/ChatConversationCreateTableView.m index 40204dad0..374836d2f 100644 --- a/Classes/ChatConversationCreateTableView.m +++ b/Classes/ChatConversationCreateTableView.m @@ -73,7 +73,12 @@ cell = [[UIChatCreateCell alloc] initWithIdentifier:kCellId]; } cell.displayNameLabel.text = [_contacts.allValues objectAtIndex:indexPath.row]; - cell.addressLabel.text = [_contacts.allKeys objectAtIndex:indexPath.row]; + LinphoneAddress *addr = [LinphoneUtils normalizeSipOrPhoneAddress:[_contacts.allKeys objectAtIndex:indexPath.row]]; + if (addr) { + cell.addressLabel.text = [NSString stringWithUTF8String:linphone_address_as_string(addr)]; + } else { + cell.addressLabel.text = [_contacts.allKeys objectAtIndex:indexPath.row]; + } return cell; }