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 13:42:58 +0100
committerErik Johnston <erik@matrix.org>2021-05-05 13:52:29 +0100
commitc856e29ccd63aa10d1c03434b1bc021753305348 (patch)
tree506412b623253d86b37b3a7fcb35c2abd5c4e04e /synapse/push/push_rule_evaluator.py
parentTime external cache response time (#9904) (diff)
downloadsynapse-c856e29ccd63aa10d1c03434b1bc021753305348.tar.xz
Remvoe dictionary based access form events
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]: