diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2023-05-04 07:54:13 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-04 11:54:13 +0000 |
commit | ded8f3d349d8481d1c9a48835cde0b94f785e371 (patch) | |
tree | 1a7aec1e9ce0e7c781283133461113936c1e8844 /rust/src/push/evaluator.rs | |
parent | Bump pyicu from 2.10.2 to 2.11 (#15509) (diff) | |
download | synapse-ded8f3d349d8481d1c9a48835cde0b94f785e371.tar.xz |
Update the base rules to remove the dont_notify action. (MSC3987) (#15534)
A dont_notify action is a no-op (and coalesce is undefined). These are both considered no-ops by the spec, per MSC3987 and the predefined push rules were updated to remove dont_notify from the list of actions.
Diffstat (limited to 'rust/src/push/evaluator.rs')
-rw-r--r-- | rust/src/push/evaluator.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/rust/src/push/evaluator.rs b/rust/src/push/evaluator.rs index 6941c61ea4..2d7c4c06be 100644 --- a/rust/src/push/evaluator.rs +++ b/rust/src/push/evaluator.rs @@ -140,7 +140,7 @@ impl PushRuleEvaluator { /// name. /// /// Returns the set of actions, if any, that match (filtering out any - /// `dont_notify` actions). + /// `dont_notify` and `coalesce` actions). pub fn run( &self, push_rules: &FilteredPushRules, @@ -198,8 +198,9 @@ impl PushRuleEvaluator { let actions = push_rule .actions .iter() - // Filter out "dont_notify" actions, as we don't store them. - .filter(|a| **a != Action::DontNotify) + // Filter out "dont_notify" and "coalesce" actions, as we don't store them + // (since they result in no action by the pushers). + .filter(|a| **a != Action::DontNotify && **a != Action::Coalesce) .cloned() .collect(); |