Rely on the room's info to decide whether a call ringing notification is outdated and should be ignored as opposed to a time based approach.

This commit is contained in:
Stefan Ceriu
2025-04-29 18:11:39 +03:00
committed by Stefan Ceriu
parent 6c8cb2bbe5
commit 690ff3caa6
5 changed files with 65 additions and 21 deletions
@@ -63,11 +63,6 @@ class NotificationServiceExtension: UNNotificationServiceExtension {
Target.nse.configure(logLevel: settings.logLevel, traceLogPacks: settings.traceLogPacks)
notificationHandler = NotificationHandler(settings: settings,
contentHandler: contentHandler,
notificationContent: mutableContent,
tag: tag)
MXLog.info("\(tag) #########################################")
ExtensionLogger.logMemory(with: tag)
@@ -82,12 +77,16 @@ class NotificationServiceExtension: UNNotificationServiceExtension {
appHooks: appHooks,
appSettings: settings)
notificationHandler = NotificationHandler(userSession: userSession,
settings: settings,
contentHandler: contentHandler,
notificationContent: mutableContent,
tag: tag)
ExtensionLogger.logMemory(with: tag)
MXLog.info("\(tag) Configured user session")
await notificationHandler?.processEvent(eventID,
roomID: roomID,
userSession: userSession)
await notificationHandler?.processEvent(eventID, roomID: roomID)
} catch {
MXLog.error("Failed creating user session with error: \(error)")
}