From b4d682f88ca0ed5a59617869be7ff850a2942e97 Mon Sep 17 00:00:00 2001 From: Stefan Ceriu Date: Tue, 22 Aug 2023 14:41:45 +0300 Subject: [PATCH] Fixes #7636 - Sound stopped working on push notifications --- MatrixSDK/Background/MXBackgroundPushRulesManager.swift | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/MatrixSDK/Background/MXBackgroundPushRulesManager.swift b/MatrixSDK/Background/MXBackgroundPushRulesManager.swift index da793d2ee..8c3d3bffc 100644 --- a/MatrixSDK/Background/MXBackgroundPushRulesManager.swift +++ b/MatrixSDK/Background/MXBackgroundPushRulesManager.swift @@ -42,7 +42,9 @@ import Foundation } } - flatRules = tmpRules + // vector-im/element-ios/issues/7636 + // Intentionally disable new backend push rules as they're not handle properly and break notification sounds + flatRules = tmpRules.filter { $0.ruleId != ".m.rule.is_user_mention" && $0.ruleId != ".m.rule.is_room_mention" } } } private var flatRules: [MXPushRule] = [] @@ -129,7 +131,9 @@ import Foundation var conditionsOk: Bool = true var runEquivalent: Bool = false - guard let kind = MXPushRuleKind(identifier: rule.kind) else { continue } + guard let kind = MXPushRuleKind(identifier: rule.kind) else { + continue + } switch kind { case .override, .underride: