//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]){ if (![self.notificationTracker shouldProcessNotification:userInfo]){
return; return;
} }
@try { @try {
call = [ResponderSessionDescriptor responderSessionDescriptorFromEncryptedRemoteNotification:userInfo]; call = [ResponderSessionDescriptor responderSessionDescriptorFromEncryptedRemoteNotification:userInfo];
DDLogDebug(@"Received remote notification. Parsed session descriptor: %@.", call); DDLogDebug(@"Received remote notification. Parsed session descriptor: %@.", call);
self.callPickUpFuture = [TOCFutureSource new]; self.callPickUpFuture = [TOCFutureSource new];
} @catch (OperationFailed* ex) { } @catch (OperationFailed* ex) {
DDLogError(@"Error parsing remote notification. Error: %@.", ex); DDLogError(@"Error parsing remote notification. Error: %@.", ex);
return; return;
} }
if (!call) { if (!call) {
DDLogError(@"Decryption of session descriptor failed"); DDLogError(@"Decryption of session descriptor failed");
return; return;
} }
[Environment.phoneManager incomingCallWithSession:call]; [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