summary refs log tree commit diff
path: root/synapse/push/push_rule_evaluator.py
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2018-11-02 14:12:49 +0000
committerGitHub <noreply@github.com>2018-11-02 14:12:49 +0000
commit90d713b8c6b8763447e31ff02ccfe5ea73a8db50 (patch)
treec20a24d265f11bb39e9f941f6050bf6c0479d098 /synapse/push/push_rule_evaluator.py
parentFix typing being reset causing infinite syncs (#4127) (diff)
parentNewsfile (diff)
downloadsynapse-90d713b8c6b8763447e31ff02ccfe5ea73a8db50.tar.xz
Merge pull request #4137 from matrix-org/erikj/clean_up_events
Clean up event accesses and tests
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 2bd321d530..cf6c8b875e 100644
--- a/synapse/push/push_rule_evaluator.py
+++ b/synapse/push/push_rule_evaluator.py
@@ -124,7 +124,7 @@ class PushRuleEvaluatorForEvent(object):
 
         # XXX: optimisation: cache our pattern regexps
         if condition['key'] == 'content.body':
-            body = self._event["content"].get("body", None)
+            body = self._event.content.get("body", None)
             if not body:
                 return False
 
@@ -140,7 +140,7 @@ class PushRuleEvaluatorForEvent(object):
         if not display_name:
             return False
 
-        body = self._event["content"].get("body", None)
+        body = self._event.content.get("body", None)
         if not body:
             return False