diff options
author | Erik Johnston <erik@matrix.org> | 2022-09-20 12:10:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-20 12:10:31 +0100 |
commit | 42d261c32f13e2de7494a0ade77c1f7b646af1fe (patch) | |
tree | af5526ed2e27eddc8b24ef22d035927fa5b32ca6 /synapse/push/clientformat.py | |
parent | Don't include redundant prev_state in new events (#13791) (diff) | |
download | synapse-42d261c32f13e2de7494a0ade77c1f7b646af1fe.tar.xz |
Port the push rule classes to Rust. (#13768)
Diffstat (limited to 'synapse/push/clientformat.py')
-rw-r--r-- | synapse/push/clientformat.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/synapse/push/clientformat.py b/synapse/push/clientformat.py index 73618d9234..ebc13beda1 100644 --- a/synapse/push/clientformat.py +++ b/synapse/push/clientformat.py @@ -16,10 +16,9 @@ import copy from typing import Any, Dict, List, Optional from synapse.push.rulekinds import PRIORITY_CLASS_INVERSE_MAP, PRIORITY_CLASS_MAP +from synapse.synapse_rust.push import FilteredPushRules, PushRule from synapse.types import UserID -from .baserules import FilteredPushRules, PushRule - def format_push_rules_for_user( user: UserID, ruleslist: FilteredPushRules @@ -34,7 +33,7 @@ def format_push_rules_for_user( rules["global"] = _add_empty_priority_class_arrays(rules["global"]) - for r, enabled in ruleslist: + for r, enabled in ruleslist.rules(): template_name = _priority_class_to_template_name(r.priority_class) rulearray = rules["global"][template_name] |