mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 00:34:47 -04:00
Clean up event accesses and tests
This is in preparation to refactor FrozenEvent to support different event formats for different room versions
This commit is contained in:
parent
1b21e771d0
commit
b86d05a279
5 changed files with 7 additions and 10 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue