From 8916acbc1367ca54a9e3fa83f3965ccd9008b245 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 10 Mar 2015 11:21:37 +0000 Subject: [PATCH] These aren't defined for redacted events so don't crash --- synapse/storage/__init__.py | 6 ++++-- 1 file 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))