summary refs log tree commit diff
path: root/synapse/push/push_rule_evaluator.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2021-05-05 16:37:37 +0100
committerErik Johnston <erik@matrix.org>2021-05-05 16:37:37 +0100
commit015fdfe5bb090d30f25fe97fc3fc41d8863418dc (patch)
tree9475cd81546630a79d31457857374a21a42f0156 /synapse/push/push_rule_evaluator.py
parentFix log contexts (diff)
parentMore ensmalling (diff)
downloadsynapse-015fdfe5bb090d30f25fe97fc3fc41d8863418dc.tar.xz
Merge branch 'erikj/smaller_events' into erikj/test_send
Diffstat (limited to 'synapse/push/push_rule_evaluator.py')
-rw-r--r--synapse/push/push_rule_evaluator.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/push/push_rule_evaluator.py b/synapse/push/push_rule_evaluator.py

index 49ecb38522..fa5985894c 100644 --- a/synapse/push/push_rule_evaluator.py +++ b/synapse/push/push_rule_evaluator.py
@@ -125,7 +125,7 @@ class PushRuleEvaluatorForEvent: self._power_levels = power_levels # Maps strings of e.g. 'content.body' -> event["content"]["body"] - self._value_cache = _flatten_dict(event) + self._value_cache = _flatten_dict(event.get_dict()) def matches( self, condition: Dict[str, Any], user_id: str, display_name: str @@ -271,7 +271,7 @@ def _re_word_boundary(r: str) -> str: def _flatten_dict( - d: Union[EventBase, dict], + d: dict, prefix: Optional[List[str]] = None, result: Optional[Dict[str, str]] = None, ) -> Dict[str, str]: