diff options
author | Erik Johnston <erikj@jki.re> | 2018-11-02 14:12:49 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-02 14:12:49 +0000 |
commit | 90d713b8c6b8763447e31ff02ccfe5ea73a8db50 (patch) | |
tree | c20a24d265f11bb39e9f941f6050bf6c0479d098 /synapse/push/httppusher.py | |
parent | Fix typing being reset causing infinite syncs (#4127) (diff) | |
parent | Newsfile (diff) | |
download | synapse-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/httppusher.py')
-rw-r--r-- | synapse/push/httppusher.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/push/httppusher.py b/synapse/push/httppusher.py index 6bd703632d..87fa7f006a 100644 --- a/synapse/push/httppusher.py +++ b/synapse/push/httppusher.py @@ -311,10 +311,10 @@ class HttpPusher(object): ] } } - if event.type == 'm.room.member': + if event.type == 'm.room.member' and event.is_state(): d['notification']['membership'] = event.content['membership'] d['notification']['user_is_target'] = event.state_key == self.user_id - if self.hs.config.push_include_content and 'content' in event: + if self.hs.config.push_include_content and event.content: d['notification']['content'] = event.content # We no longer send aliases separately, instead, we send the human |