Only enforce CallKit privacy for missed calls if CallKit is present.

// FREEBIE
pull/1/head
Matthew Chen 9 years ago
parent e11381ffd7
commit 3fcdffb919

@ -68,7 +68,8 @@
case NotificationNameNoPreview: { case NotificationNameNoPreview: {
notification.userInfo = @{ Signal_Call_UserInfo_Key : cThread.contactIdentifier }; notification.userInfo = @{ Signal_Call_UserInfo_Key : cThread.contactIdentifier };
notification.category = Signal_CallBack_Category; notification.category = Signal_CallBack_Category;
notification.alertBody = ([[Environment getCurrent].preferences isCallKitPrivacyEnabled] notification.alertBody = (([UIDevice currentDevice].supportsCallKit &&
[[Environment getCurrent].preferences isCallKitPrivacyEnabled])
? [CallStrings missedCallNotificationBodyWithoutCallerName] ? [CallStrings missedCallNotificationBodyWithoutCallerName]
: [NSString stringWithFormat:[CallStrings missedCallNotificationBodyWithCallerName], [thread name]]); : [NSString stringWithFormat:[CallStrings missedCallNotificationBodyWithCallerName], [thread name]]);
break; break;
@ -136,7 +137,8 @@
} }
case NotificationNameNoPreview: case NotificationNameNoPreview:
case NotificationNamePreview: { case NotificationNamePreview: {
alertMessage = ([[Environment getCurrent].preferences isCallKitPrivacyEnabled] alertMessage = (([UIDevice currentDevice].supportsCallKit &&
[[Environment getCurrent].preferences isCallKitPrivacyEnabled])
? [CallStrings missedCallNotificationBodyWithoutCallerName] ? [CallStrings missedCallNotificationBodyWithoutCallerName]
: [NSString stringWithFormat:[CallStrings missedCallNotificationBodyWithCallerName], callerName]); : [NSString stringWithFormat:[CallStrings missedCallNotificationBodyWithCallerName], callerName]);
break; break;

Loading…
Cancel
Save