mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-16 06:28:27 +02:00
Implement MSC3987: Push actions clean-up
This commit is contained in:
@@ -888,6 +888,7 @@ class NotificationService: UNNotificationServiceExtension {
|
||||
private extension MXPushRule {
|
||||
var dontNotify: Bool {
|
||||
let actions = (actions as? [MXPushRuleAction]) ?? []
|
||||
return actions.contains { $0.actionType == MXPushRuleActionTypeDontNotify }
|
||||
// Support for MSC3987: The dont_notify push rule action is deprecated and replaced by an empty actions list.
|
||||
return actions.isEmpty || actions.contains { $0.actionType == MXPushRuleActionTypeDontNotify }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user