mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-31 02:09:22 +00:00
Fix the local notification when receiving a chat message from an email address in background mode.
This commit is contained in:
parent
40588f3d31
commit
13e4db5a81
1 changed files with 7 additions and 1 deletions
|
|
@ -585,11 +585,17 @@ static void linphone_iphone_registration_state(LinphoneCore *lc, LinphoneProxyCo
|
|||
ABRecordRef contact = [fastAddressBook getContact:normalizedSipAddress];
|
||||
if(contact) {
|
||||
address = [FastAddressBook getContactDisplayName:contact];
|
||||
} else {
|
||||
if ([[LinphoneManager instance] lpConfigBoolForKey:@"show_contacts_emails_preference"] == true) {
|
||||
LinphoneAddress *linphoneAddress = linphone_address_new([normalizedSipAddress cStringUsingEncoding:[NSString defaultCStringEncoding]]);
|
||||
address = [NSString stringWithUTF8String:linphone_address_get_username(linphoneAddress)];
|
||||
linphone_address_destroy(linphoneAddress);
|
||||
}
|
||||
}
|
||||
if(address == nil) {
|
||||
address = @"Unknown";
|
||||
}
|
||||
|
||||
|
||||
// Create a new notification
|
||||
UILocalNotification* notif = [[[UILocalNotification alloc] init] autorelease];
|
||||
if (notif) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue