diff options
author | Andrew Morgan <andrew@amorgan.xyz> | 2019-01-17 15:46:39 +0000 |
---|---|---|
committer | Andrew Morgan <andrew@amorgan.xyz> | 2019-01-22 11:00:04 +0000 |
commit | 887ca93a1b3b01d1da2c80549d5d2b1166e0608b (patch) | |
tree | ac91bac1cbc810c2090fa6bc7cd518e1f69a6b39 /synapse | |
parent | Add changelog (diff) | |
download | synapse-887ca93a1b3b01d1da2c80549d5d2b1166e0608b.tar.xz |
Prevent crash on user who doesn't have any direct rooms
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/handlers/room.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py index 3bfba6c744..626c9f9166 100644 --- a/synapse/handlers/room.py +++ b/synapse/handlers/room.py @@ -266,7 +266,7 @@ class RoomCreationHandler(BaseHandler): user_id, ) - if user_account_data: + if user_account_data and "m.direct" in user_account_data[0]: direct_rooms = user_account_data[0]["m.direct"] # Check if this room was a DM if old_room_id in direct_rooms[user_id]: |