From 97a8f5ac9831d1f66c6e7dea59f5df6bfc617f8f Mon Sep 17 00:00:00 2001 From: Benjamin Reis Date: Mon, 27 Nov 2017 15:02:30 +0100 Subject: [PATCH] get chat room from chat message instad of from --- Classes/PhoneMainView.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Classes/PhoneMainView.m b/Classes/PhoneMainView.m index 8d168cdef..d3cee0dc3 100644 --- a/Classes/PhoneMainView.m +++ b/Classes/PhoneMainView.m @@ -261,12 +261,12 @@ static RootViewManager *rootViewManagerInstance = nil; #pragma mark - Event Functions - (void)textReceived:(NSNotification *)notif { - LinphoneAddress *from = [[notif.userInfo objectForKey:@"from_address"] pointerValue]; + LinphoneChatMessage *msg = [[notif.userInfo objectForKey:@"message"] pointerValue]; NSString *callID = [notif.userInfo objectForKey:@"call-id"]; [self updateApplicationBadgeNumber]; - LinphoneChatRoom *room = from ? linphone_core_get_chat_room(LC, from) : NULL; + LinphoneChatRoom *room = msg ? linphone_chat_message_get_chat_room(msg) : NULL; - if (from == nil || room == NULL) + if (!room) return; ChatConversationView *view = VIEW(ChatConversationView);