mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Notifications Enabled (#760)
* Notifications Enabled with default static text notifications enabled with default static text code improvement added the share key * added the changelog * notification ID is added to the json only if it exists * renamed Bundle.mainApp to app and updated the strings from localazy * made a struct for the APNSPayload * APNS Payload fix
This commit is contained in:
@@ -36,11 +36,13 @@ class NotificationServiceExtension: UNNotificationServiceExtension {
|
||||
guard !DataProtectionManager.isDeviceLockedAfterReboot(containerURL: URL.appGroupContainerDirectory),
|
||||
let roomId = request.roomId,
|
||||
let eventId = request.eventId,
|
||||
let credentials = keychainController.restorationTokens().first else {
|
||||
let notificationID = request.pusherNotificationClientIdentifier,
|
||||
let credentials = keychainController.restorationTokens().first(where: { $0.restorationToken.pusherNotificationClientIdentifier == notificationID }) else {
|
||||
// We cannot process this notification, it might be due to one of these:
|
||||
// - Device rebooted and locked
|
||||
// - Not a Matrix notification
|
||||
// - User is not signed in
|
||||
// - NotificationID could not be resolved
|
||||
return contentHandler(request.content)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user