Commit 392f991f authored by Benjamin REIS's avatar Benjamin REIS

repair flexisip pusher notification display

parent d0a7f4ed
......@@ -436,7 +436,7 @@
return;
}
NSString *loc_key = [aps objectForKey:@"loc-key"];
NSString *loc_key = [aps objectForKey:@"loc-key"] ?: [[aps objectForKey:@"alert"] objectForKey:@"loc-key"];
NSString *callId = [aps objectForKey:@"call-id"] ?: @"";
if (!loc_key) {
LOGE(@"Notification [%p] has no loc_key, it's impossible to process it.", userInfo);
......@@ -486,6 +486,12 @@
}
- (BOOL)addLongTaskIDforCallID:(NSString *)callId {
if (!callId)
return FALSE;
if ([callId isEqualToString:@""])
return FALSE;
NSDictionary *dict = LinphoneManager.instance.pushDict;
if ([[dict allKeys] indexOfObject:callId] != NSNotFound)
return FALSE;
......
......@@ -2161,6 +2161,12 @@ static int comp_call_state_paused(const LinphoneCall *call, const void *param) {
}
- (void)startPushLongRunningTask:(NSString *)loc_key callId:(NSString *)callId {
if (!callId)
return;
if ([callId isEqualToString:@""])
return;
if ([loc_key isEqualToString:@"IM_MSG"]) {
[[UIApplication sharedApplication] endBackgroundTask:pushBgTaskMsg];
pushBgTaskMsg = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment