File tree Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -315,26 +315,30 @@ + (BOOL)application:(UIApplication *)application
315315 INInteraction *interaction = userActivity.interaction ;
316316 INPerson *contact;
317317 NSString *handle;
318-
319- if ([userActivity.activityType isEqualToString: INStartAudioCallIntentIdentifier] || [userActivity.activityType isEqualToString: INStartVideoCallIntentIdentifier]) {
318+ BOOL isAudioCall = [userActivity.activityType isEqualToString: INStartAudioCallIntentIdentifier];
319+ BOOL isVideoCall = [userActivity.activityType isEqualToString: INStartVideoCallIntentIdentifier];
320+
321+ if (isAudioCall) {
320322 INStartAudioCallIntent *startAudioCallIntent = (INStartAudioCallIntent *)interaction.intent ;
321323 contact = [startAudioCallIntent.contacts firstObject ];
324+ } else if (isVideoCall) {
325+ INStartVideoCallIntent *startVideoCallIntent = (INStartVideoCallIntent *)interaction.intent ;
326+ contact = [startVideoCallIntent.contacts firstObject ];
322327 }
323-
328+
324329 if (contact != nil ) {
325330 handle = contact.personHandle .value ;
326331 }
327-
332+
328333 if (handle != nil && handle.length > 0 ){
329334 NSDictionary *userInfo = @{
330- @" handle" : handle,
331- @" video" : @NO
332- };
333-
335+ @" handle" : handle,
336+ @" video" : @(isVideoCall)
337+ };
338+
334339 [[NSNotificationCenter defaultCenter ] postNotificationName: RNCallKitHandleStartCallNotification
335340 object: self
336341 userInfo: userInfo];
337-
338342 return YES ;
339343 }
340344 return NO ;
You can’t perform that action at this time.
0 commit comments