mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
Handle chat initiation to an email address.
This commit is contained in:
parent
b30b94d5c7
commit
10f8b117f9
1 changed files with 13 additions and 1 deletions
|
|
@ -238,7 +238,19 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
if(remoteAddress != nil) {
|
||||
[remoteAddress release];
|
||||
}
|
||||
remoteAddress = [aRemoteAddress copy];
|
||||
if ([aRemoteAddress hasPrefix:@"sip:"]) {
|
||||
remoteAddress = [aRemoteAddress copy];
|
||||
} else {
|
||||
char normalizedUserName[256];
|
||||
LinphoneCore *lc = [LinphoneManager getLc];
|
||||
LinphoneProxyConfig* proxyCfg;
|
||||
linphone_core_get_default_proxy(lc,&proxyCfg);
|
||||
LinphoneAddress* linphoneAddress = linphone_address_new(linphone_core_get_identity(lc));
|
||||
linphone_proxy_config_normalize_number(proxyCfg, [aRemoteAddress cStringUsingEncoding:[NSString defaultCStringEncoding]], normalizedUserName, sizeof(normalizedUserName));
|
||||
linphone_address_set_username(linphoneAddress, normalizedUserName);
|
||||
remoteAddress = [[NSString stringWithUTF8String:linphone_address_as_string_uri_only(linphoneAddress)] copy];
|
||||
linphone_address_destroy(linphoneAddress);
|
||||
}
|
||||
[messageField setText:@""];
|
||||
[self update];
|
||||
[tableController setRemoteAddress: remoteAddress];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue