Clear notifications for fully read rooms using the event's timestamp instead of delivery date

This commit is contained in:
Stefan Ceriu
2026-10-06 15:40:24 +03:00
parent fc75f90ef5
commit 2182446684
8 changed files with 48 additions and 3 deletions
@@ -22,6 +22,10 @@ nonisolated extension UNNotificationContent {
userInfo[NotificationConstants.UserInfoKey.eventIdentifier] as? String
}
@objc var eventDate: Date? {
userInfo[NotificationConstants.UserInfoKey.eventDate] as? Date
}
@objc var pusherNotificationClientIdentifier: String? {
userInfo[NotificationConstants.UserInfoKey.pusherNotificationClientIdentifier] as? String
}
@@ -59,6 +63,15 @@ nonisolated extension UNMutableNotificationContent {
}
}
override var eventDate: Date? {
get {
userInfo[NotificationConstants.UserInfoKey.eventDate] as? Date
}
set {
userInfo[NotificationConstants.UserInfoKey.eventDate] = newValue
}
}
override var threadRootEventID: String? {
get {
userInfo[NotificationConstants.UserInfoKey.threadRootEventIdentifier] as? String