diff --git a/Classes/LinphoneAppDelegate.m b/Classes/LinphoneAppDelegate.m index ae4adeb89..950bcb362 100644 --- a/Classes/LinphoneAppDelegate.m +++ b/Classes/LinphoneAppDelegate.m @@ -347,8 +347,8 @@ { [[LinphoneManager instance] acceptCallForCallId:[notification.userInfo objectForKey:@"callId"]]; } - } else if([notification.userInfo objectForKey:@"from"] != nil) { - NSString *remoteContact = (NSString*)[notification.userInfo objectForKey:@"from"]; + } else if([notification.userInfo objectForKey:@"from_addr"] != nil) { + NSString *remoteContact = (NSString*)[notification.userInfo objectForKey:@"from_addr"]; // Go to ChatRoom view [[PhoneMainView instance] changeCurrentView:[ChatViewController compositeViewDescription]]; LinphoneChatRoom*room = [self findChatRoomForContact:remoteContact]; @@ -428,7 +428,7 @@ // use the standard handler [self application:application didReceiveLocalNotification:notification]; } else if( [identifier isEqualToString:@"mark_read"] ){ - NSString* from = [notification.userInfo objectForKey:@"from"]; + NSString* from = [notification.userInfo objectForKey:@"from_addr"]; LinphoneChatRoom* room = linphone_core_get_or_create_chat_room(lc, [from UTF8String]); if( room ){ linphone_chat_room_mark_as_read(room); diff --git a/Classes/LinphoneManager.m b/Classes/LinphoneManager.m index 11fbe85c7..a43b03775 100644 --- a/Classes/LinphoneManager.m +++ b/Classes/LinphoneManager.m @@ -895,6 +895,7 @@ static void linphone_iphone_registration_state(LinphoneCore *lc, LinphoneProxyCo const LinphoneAddress* remoteAddress = linphone_chat_message_get_from_address(msg); char* c_address = linphone_address_as_string_uri_only(remoteAddress); NSString* address = [NSString stringWithUTF8String:c_address]; + NSString* remote_uri = [NSString stringWithUTF8String:c_address]; const char* call_id = linphone_chat_message_get_custom_header(msg, "Call-ID"); NSString* callID = [NSString stringWithUTF8String:call_id]; @@ -926,7 +927,7 @@ static void linphone_iphone_registration_state(LinphoneCore *lc, LinphoneProxyCo notif.alertBody = [NSString stringWithFormat:NSLocalizedString(@"IM_MSG",nil), address]; notif.alertAction = NSLocalizedString(@"Show", nil); notif.soundName = @"msg.caf"; - notif.userInfo = @{@"from":address, @"call-id":callID}; + notif.userInfo = @{@"from":address, @"from_addr":remote_uri, @"call-id":callID}; [[UIApplication sharedApplication] presentLocalNotificationNow:notif]; }