summary refs log tree commit diff
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2015-03-10 11:21:37 +0000
committerDavid Baker <dave@matrix.org>2015-03-10 11:21:37 +0000
commit8916acbc1367ca54a9e3fa83f3965ccd9008b245 (patch)
tree6850fe02c7691bf777ab74da102ce9e36117d0ce
parentFix bug in logging. (diff)
downloadsynapse-8916acbc1367ca54a9e3fa83f3965ccd9008b245.tar.xz
These aren't defined for redacted events so don't crash
-rw-r--r--synapse/storage/__init__.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/storage/__init__.py b/synapse/storage/__init__.py
index a3ff995695..14a788c194 100644
--- a/synapse/storage/__init__.py
+++ b/synapse/storage/__init__.py
@@ -484,9 +484,11 @@ class DataStore(RoomMemberStore, RoomStore,
 
         for e in events:
             if e.type == 'm.room.name':
-                name = e.content['name']
+                if 'name' in e.content:
+                    name = e.content['name']
             elif e.type == 'm.room.aliases':
-                aliases.extend(e.content['aliases'])
+                if 'aliases' in e.content:
+                    aliases.extend(e.content['aliases'])
 
         defer.returnValue((name, aliases))