Notifications are now handled when the app is in a killed state (#801)

* WIP, added support for receiver id and managed a way to store the app router state

* WIP, added support for receiver id and managed a way to store the app router state

* Notification Manager is now becoming the UNUserNotificationDelegate ASAP

* code improvements + changelog

* fixed Unit Tests

* pr suggestions
This commit is contained in:
Mauro
2023-04-14 14:24:48 +02:00
committed by GitHub
parent 41994baa4f
commit 3d0d883637
19 changed files with 338 additions and 89 deletions
@@ -88,7 +88,8 @@ class NotificationServiceExtension: UNNotificationServiceExtension {
// First process without a media proxy.
// After this some properties of the notification should be set, like title, subtitle, sound etc.
guard let firstContent = try await itemProxy.process(with: roomId,
guard let firstContent = try await itemProxy.process(receiverId: credentials.userID,
roomId: roomId,
mediaProvider: nil) else {
MXLog.error("\(tag) not even first content")
@@ -109,7 +110,8 @@ class NotificationServiceExtension: UNNotificationServiceExtension {
MXLog.info("\(tag) process with media")
// There is some media to load, process it again
if let latestContent = try await itemProxy.process(with: roomId,
if let latestContent = try await itemProxy.process(receiverId: credentials.userID,
roomId: roomId,
mediaProvider: createMediaProvider(with: credentials)) {
// Processing finished, hopefully with some media
modifiedContent = latestContent