forked from mirrors/linphone-iphone
Temporary fix for notif song of chat room invite and chat room invite
msg
This commit is contained in:
parent
da0dcd030b
commit
4d05de7bc9
1 changed files with 10 additions and 2 deletions
|
|
@ -68,6 +68,7 @@ class NotificationService: UNNotificationServiceExtension {
|
|||
bestAttemptContent.body = chatRoom.subject
|
||||
}
|
||||
|
||||
bestAttemptContent.sound = UNNotificationSound(named: UNNotificationSoundName("msg.caf")) // TODO : temporary fix, to be removed after flexisip release
|
||||
contentHandler(bestAttemptContent)
|
||||
return
|
||||
}
|
||||
|
|
@ -118,8 +119,15 @@ class NotificationService: UNNotificationServiceExtension {
|
|||
if let contentHandler = contentHandler, let bestAttemptContent = bestAttemptContent {
|
||||
NSLog("[msgNotificationService] serviceExtensionTimeWillExpire")
|
||||
bestAttemptContent.categoryIdentifier = "app_active"
|
||||
bestAttemptContent.title = NSLocalizedString("Message received", comment: "")
|
||||
bestAttemptContent.body = NSLocalizedString("You have received a message.", comment: "")
|
||||
|
||||
if let chatRoomInviteAddr = bestAttemptContent.userInfo["chat-room-addr"] as? String, !chatRoomInviteAddr.isEmpty {
|
||||
bestAttemptContent.title = NSLocalizedString("You have been added to a chat room", comment: "")
|
||||
bestAttemptContent.body = ""
|
||||
bestAttemptContent.sound = UNNotificationSound(named: UNNotificationSoundName("msg.caf")) // TODO : temporary fix, to be removed after flexisip release
|
||||
} else {
|
||||
bestAttemptContent.title = NSLocalizedString("Message received", comment: "")
|
||||
bestAttemptContent.body = NSLocalizedString("You have received a message.", comment: "")
|
||||
}
|
||||
contentHandler(bestAttemptContent)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue