mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Remove delivered notifications if their event gets redacted. (#3191)
This commit is contained in:
@@ -63,6 +63,10 @@ struct NotificationContentBuilder {
|
||||
let notification = UNMutableNotificationContent()
|
||||
notification.receiverID = notificationItem.receiverID
|
||||
notification.roomID = notificationItem.roomID
|
||||
notification.eventID = switch notificationItem.event {
|
||||
case .timeline(let event): event.eventId()
|
||||
case .invite, .none: nil
|
||||
}
|
||||
notification.sound = notificationItem.isNoisy ? UNNotificationSound(named: UNNotificationSoundName(rawValue: "message.caf")) : nil
|
||||
// So that the UI groups notification that are received for the same room but also for the same user
|
||||
// Removing the @ fixes an iOS bug where the notification crashes if the mute button is tapped
|
||||
|
||||
Reference in New Issue
Block a user