//FREEBIE
pull/1/head
Frederic Jacobs 10 years ago
parent 9e8ba91304
commit 14164d9855

@ -182,27 +182,28 @@
} }
-(void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo { -(void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {
ResponderSessionDescriptor* call; if ([self isRedPhonePush:userInfo]) {
ResponderSessionDescriptor* call;
if (![self.notificationTracker shouldProcessNotification:userInfo]){
return;
}
if (![self.notificationTracker shouldProcessNotification:userInfo]){ @try {
return; call = [ResponderSessionDescriptor responderSessionDescriptorFromEncryptedRemoteNotification:userInfo];
} DDLogDebug(@"Received remote notification. Parsed session descriptor: %@.", call);
self.callPickUpFuture = [TOCFutureSource new];
} @catch (OperationFailed* ex) {
DDLogError(@"Error parsing remote notification. Error: %@.", ex);
return;
}
@try { if (!call) {
call = [ResponderSessionDescriptor responderSessionDescriptorFromEncryptedRemoteNotification:userInfo]; DDLogError(@"Decryption of session descriptor failed");
DDLogDebug(@"Received remote notification. Parsed session descriptor: %@.", call); return;
self.callPickUpFuture = [TOCFutureSource new]; }
} @catch (OperationFailed* ex) {
DDLogError(@"Error parsing remote notification. Error: %@.", ex);
return;
}
if (!call) { [Environment.phoneManager incomingCallWithSession:call];
DDLogError(@"Decryption of session descriptor failed");
return;
} }
[Environment.phoneManager incomingCallWithSession:call];
} }
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler { - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler {

Loading…
Cancel
Save