Merge branch 'mkirk/missed-call-audible-notification'

pull/1/head
Michael Kirk 8 years ago
commit 7f22325532

@ -16,6 +16,8 @@
#import <SignalServiceKit/TextSecureKitEnv.h> #import <SignalServiceKit/TextSecureKitEnv.h>
#import <SignalServiceKit/Threading.h> #import <SignalServiceKit/Threading.h>
NSString *const kNotificationsManagerNewMesssageSoundName = @"NewMessage.aifc";
@interface NotificationsManager () @interface NotificationsManager ()
@property (nonatomic) SystemSoundID newMessageSound; @property (nonatomic) SystemSoundID newMessageSound;
@ -96,6 +98,9 @@
PushManagerUserInfoKeysCallBackSignalRecipientId : call.remotePhoneNumber PushManagerUserInfoKeysCallBackSignalRecipientId : call.remotePhoneNumber
}; };
if ([self shouldPlaySoundForNotification]) {
notification.soundName = kNotificationsManagerNewMesssageSoundName;
}
NSString *alertMessage; NSString *alertMessage;
switch (self.notificationPreviewType) { switch (self.notificationPreviewType) {
@ -132,6 +137,9 @@
PushManagerUserInfoKeysCallBackSignalRecipientId : call.remotePhoneNumber, PushManagerUserInfoKeysCallBackSignalRecipientId : call.remotePhoneNumber,
Signal_Thread_UserInfo_Key : thread.uniqueId Signal_Thread_UserInfo_Key : thread.uniqueId
}; };
if ([self shouldPlaySoundForNotification]) {
notification.soundName = kNotificationsManagerNewMesssageSoundName;
}
NSString *alertMessage; NSString *alertMessage;
switch (self.notificationPreviewType) { switch (self.notificationPreviewType) {
@ -169,6 +177,9 @@
PushManagerUserInfoKeysCallBackSignalRecipientId : call.remotePhoneNumber, PushManagerUserInfoKeysCallBackSignalRecipientId : call.remotePhoneNumber,
Signal_Thread_UserInfo_Key : thread.uniqueId Signal_Thread_UserInfo_Key : thread.uniqueId
}; };
if ([self shouldPlaySoundForNotification]) {
notification.soundName = kNotificationsManagerNewMesssageSoundName;
}
NSString *alertMessage; NSString *alertMessage;
switch (self.notificationPreviewType) { switch (self.notificationPreviewType) {
@ -210,7 +221,7 @@
UILocalNotification *notification = [[UILocalNotification alloc] init]; UILocalNotification *notification = [[UILocalNotification alloc] init];
notification.userInfo = @{Signal_Thread_UserInfo_Key : thread.uniqueId}; notification.userInfo = @{Signal_Thread_UserInfo_Key : thread.uniqueId};
if (shouldPlaySound) { if (shouldPlaySound) {
notification.soundName = @"NewMessage.aifc"; notification.soundName = kNotificationsManagerNewMesssageSoundName;
} }
NSString *alertBodyString = @""; NSString *alertBodyString = @"";
@ -259,7 +270,7 @@
if ([UIApplication sharedApplication].applicationState != UIApplicationStateActive && messageDescription) { if ([UIApplication sharedApplication].applicationState != UIApplicationStateActive && messageDescription) {
UILocalNotification *notification = [[UILocalNotification alloc] init]; UILocalNotification *notification = [[UILocalNotification alloc] init];
if (shouldPlaySound) { if (shouldPlaySound) {
notification.soundName = @"NewMessage.aifc"; notification.soundName = kNotificationsManagerNewMesssageSoundName;
} }
switch (self.notificationPreviewType) { switch (self.notificationPreviewType) {

Loading…
Cancel
Save