mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Remote Push Notifications can now be decrypted (#854)
* refactored the NSE to use the client function * removed unused imports in the target.yml * some code improvements * changelog * code improvement * code improvement * more code improvements * separated the client and the media provider in a dedicated NSEUserSession * Update ElementX/Sources/Services/Client/ClientProxy.swift Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com> * pr suggestions * logging the error --------- Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
This commit is contained in:
@@ -104,11 +104,13 @@ class NotificationManager: NSObject, NotificationManagerProtocol {
|
||||
guard let userSession,
|
||||
notification.event.timestamp > ServiceLocator.shared.settings.lastLaunchDate else { return }
|
||||
do {
|
||||
guard let content = try await notification.process(mediaProvider: userSession.mediaProvider),
|
||||
let identifier = notification.id else {
|
||||
guard let identifier = notification.id else {
|
||||
return
|
||||
}
|
||||
|
||||
let content = try await notification.process(mediaProvider: userSession.mediaProvider)
|
||||
let request = UNNotificationRequest(identifier: identifier, content: content, trigger: nil)
|
||||
|
||||
guard !ServiceLocator.shared.settings.servedNotificationIdentifiers.contains(identifier) else {
|
||||
MXLog.info("NotificationManager] local notification discarded because it has already been served")
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user