Add boot detection in the NSE and use this to inform the user that there may be more notifications. (#5054)

* Add an initial implementation of the receivedWhileOfflineNotification.

* Only deliver a single receivedWhileOffline notification per boot and clarify the API.

* Add a 15-minute threshold for the receiveWhileOfflineNotification.
This commit is contained in:
Doug
2026-02-06 15:18:09 +00:00
committed by GitHub
parent bff328554a
commit 7532a792b7
11 changed files with 157 additions and 21 deletions
@@ -29,6 +29,10 @@ extension UNNotificationContent {
@objc var threadRootEventID: String? {
userInfo[NotificationConstants.UserInfoKey.threadRootEventIdentifier] as? String
}
var unreadCount: Int? {
userInfo[NotificationConstants.UserInfoKey.unreadCount] as? Int
}
}
extension UNMutableNotificationContent {
@@ -40,7 +44,7 @@ extension UNMutableNotificationContent {
userInfo[NotificationConstants.UserInfoKey.receiverIdentifier] = newValue
}
}
override var roomID: String? {
get {
userInfo[NotificationConstants.UserInfoKey.roomIdentifier] as? String
@@ -67,8 +71,4 @@ extension UNMutableNotificationContent {
userInfo[NotificationConstants.UserInfoKey.threadRootEventIdentifier] = newValue
}
}
var unreadCount: Int? {
userInfo[NotificationConstants.UserInfoKey.unreadCount] as? Int
}
}