Remove delivered notifications if their event gets redacted. (#3191)

This commit is contained in:
Doug
2024-08-22 13:49:00 +01:00
committed by GitHub
parent a1cb6bd376
commit d54e08e815
4 changed files with 54 additions and 10 deletions
@@ -44,6 +44,10 @@ extension UNNotificationContent {
@objc var roomID: String? {
userInfo[NotificationConstants.UserInfoKey.roomIdentifier] as? String
}
@objc var eventID: String? {
userInfo[NotificationConstants.UserInfoKey.eventIdentifier] as? String
}
}
extension UNMutableNotificationContent {
@@ -64,6 +68,15 @@ extension UNMutableNotificationContent {
userInfo[NotificationConstants.UserInfoKey.roomIdentifier] = newValue
}
}
override var eventID: String? {
get {
userInfo[NotificationConstants.UserInfoKey.eventIdentifier] as? String
}
set {
userInfo[NotificationConstants.UserInfoKey.eventIdentifier] = newValue
}
}
func addMediaAttachment(using mediaProvider: MediaProviderProtocol?,
mediaSource: MediaSourceProxy) async -> UNMutableNotificationContent {