diff options
author | Mark Haines <mark.haines@matrix.org> | 2015-10-22 17:08:59 +0100 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2015-10-22 17:08:59 +0100 |
commit | 4e05aab4f7daa79d3a521f3477f6ade10157350b (patch) | |
tree | edc917f1e1589a15559a8087aa8b6c3eef2cd7e9 | |
parent | Support filtering events represented as dicts. (diff) | |
download | synapse-4e05aab4f7daa79d3a521f3477f6ade10157350b.tar.xz |
Don't assume that the event has a room_id or sender
-rw-r--r-- | synapse/api/filtering.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/api/filtering.py b/synapse/api/filtering.py index 522b151c35..765d1bc9d5 100644 --- a/synapse/api/filtering.py +++ b/synapse/api/filtering.py @@ -191,8 +191,8 @@ class Filter(object): ) else: return self.check_fields( - event.room_id, - event.sender, + getattr(event, "room_id", None), + getattr(event, "sender", None), event.type, ) |