summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2015-10-22 17:08:59 +0100
committerMark Haines <mark.haines@matrix.org>2015-10-22 17:08:59 +0100
commit4e05aab4f7daa79d3a521f3477f6ade10157350b (patch)
treeedc917f1e1589a15559a8087aa8b6c3eef2cd7e9 /synapse
parentSupport filtering events represented as dicts. (diff)
downloadsynapse-4e05aab4f7daa79d3a521f3477f6ade10157350b.tar.xz
Don't assume that the event has a room_id or sender
Diffstat (limited to 'synapse')
-rw-r--r--synapse/api/filtering.py4
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,
             )