From 3acc47d6ad82d85d372b8a9128ed89af7750aee7 Mon Sep 17 00:00:00 2001 From: Frederic Jacobs Date: Wed, 23 Dec 2015 00:11:03 +0100 Subject: [PATCH] Fixes #832 --- Signal/src/environment/NotificationsManager.m | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Signal/src/environment/NotificationsManager.m b/Signal/src/environment/NotificationsManager.m index b9bcd9fd3..8a206b168 100644 --- a/Signal/src/environment/NotificationsManager.m +++ b/Signal/src/environment/NotificationsManager.m @@ -49,11 +49,15 @@ } UILocalNotification *notification = [[UILocalNotification alloc] init]; - notification.category = Signal_CallBack_Category; - notification.userInfo = @{Signal_Call_UserInfo_Key : cThread.contactIdentifier}; notification.soundName = @"NewMessage.aifc"; - notification.alertBody = - [NSString stringWithFormat:NSLocalizedString(@"MSGVIEW_MISSED_CALL", nil), [thread name]]; + if ([[Environment preferences] notificationPreviewType] == NotificationNoNameNoPreview) { + notification.alertBody = [NSString stringWithFormat:NSLocalizedString(@"MISSED_CALL", nil)]; + } else { + notification.userInfo = @{Signal_Call_UserInfo_Key : cThread.contactIdentifier}; + notification.category = Signal_CallBack_Category; + notification.alertBody = + [NSString stringWithFormat:NSLocalizedString(@"MSGVIEW_MISSED_CALL", nil), [thread name]]; + } [[PushManager sharedManager] presentNotification:notification]; }