diff options
author | Mark Haines <mark.haines@matrix.org> | 2014-12-19 17:52:58 +0000 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2014-12-19 17:52:58 +0000 |
commit | 420ccfc925bbdc4344e3f870b61dba2dd5069f6b (patch) | |
tree | a705309ba66e2e60e3796c276bd2e2f3867e1956 /synapse/storage/room.py | |
parent | Merge branch 'release-v0.6.0' (diff) | |
parent | Mock ratelimiter to make tests pass. (diff) | |
download | synapse-420ccfc925bbdc4344e3f870b61dba2dd5069f6b.tar.xz |
Merge branch 'hotfixes-v0.6.0' v0.6.0a
Diffstat (limited to 'synapse/storage/room.py')
-rw-r--r-- | synapse/storage/room.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/synapse/storage/room.py b/synapse/storage/room.py index 2378d65943..c20abbfe4d 100644 --- a/synapse/storage/room.py +++ b/synapse/storage/room.py @@ -135,26 +135,26 @@ class RoomStore(SQLBaseStore): defer.returnValue(ret) def _store_room_topic_txn(self, txn, event): - if hasattr(event, "topic"): + if hasattr(event, "content") and "topic" in event.content: self._simple_insert_txn( txn, "topics", { "event_id": event.event_id, "room_id": event.room_id, - "topic": event.topic, + "topic": event.content["topic"], } ) def _store_room_name_txn(self, txn, event): - if hasattr(event, "name"): + if hasattr(event, "content") and "name" in event.content: self._simple_insert_txn( txn, "room_names", { "event_id": event.event_id, "room_id": event.room_id, - "name": event.name, + "name": event.content["name"], } ) |