mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-28 23:32:41 +00:00
Merge pull request #3435 from vector-im/fix_3423
Fix Losing Sound on Notifications
This commit is contained in:
commit
eb444a0754
2 changed files with 5 additions and 4 deletions
|
@ -39,6 +39,7 @@ Bug fix:
|
|||
* Universal links: Fix broken links for web apps (#3420).
|
||||
* SettingsViewController: Fix pan gesture crash (#3396).
|
||||
* RecentsViewController: Fix crash on dequeue some cells (#3433).
|
||||
* NotificationService: Fix losing sound when not showing decrypted content in notifications (#3423).
|
||||
|
||||
Changes in 0.11.6 (2020-06-30)
|
||||
===============================================
|
||||
|
|
|
@ -168,8 +168,8 @@ class NotificationService: UNNotificationServiceExtension {
|
|||
// encrypted
|
||||
if !self.showDecryptedContentInNotifications {
|
||||
// do not show decrypted content in notification
|
||||
NSLog("[NotificationService] fetchEvent: Do not show decrypted content in notifications.")
|
||||
self.fallbackToBestAttemptContent(forEventId: event.eventId)
|
||||
NSLog("[NotificationService] fetchEvent: Do not show decrypted content in notifications, no need to attempt to decrypt it.")
|
||||
self.processEvent(event)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -399,7 +399,7 @@ class NotificationService: UNNotificationServiceExtension {
|
|||
})
|
||||
} else {
|
||||
// Encrypted messages falls here
|
||||
notificationBody = NSString.localizedUserNotificationString(forKey: "MESSAGE_IN_X", arguments: [eventSenderName as Any])
|
||||
notificationBody = NSString.localizedUserNotificationString(forKey: "MESSAGE", arguments: [])
|
||||
}
|
||||
} else {
|
||||
notificationTitle = eventSenderName
|
||||
|
@ -416,7 +416,7 @@ class NotificationService: UNNotificationServiceExtension {
|
|||
break
|
||||
default:
|
||||
// Encrypted messages falls here
|
||||
notificationBody = NSString.localizedUserNotificationString(forKey: "MESSAGE_FROM_X", arguments: [eventSenderName as Any])
|
||||
notificationBody = NSString.localizedUserNotificationString(forKey: "MESSAGE", arguments: [])
|
||||
break
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue