diff options
author | Mark Haines <mark.haines@matrix.org> | 2014-11-18 15:43:17 +0000 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2014-11-18 15:43:17 +0000 |
commit | 3553101eb31666742d7f3c3480a69637feb81104 (patch) | |
tree | e474841b809b92a3838c63f1fe0a5248d601a501 /synapse/api | |
parent | SYN-149: Enable auth for events added during room creation since they should ... (diff) | |
download | synapse-3553101eb31666742d7f3c3480a69637feb81104.tar.xz |
Null check when determining default power levels
Diffstat (limited to 'synapse/api')
-rw-r--r-- | synapse/api/auth.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/api/auth.py b/synapse/api/auth.py index 635571d2b6..1a8785e890 100644 --- a/synapse/api/auth.py +++ b/synapse/api/auth.py @@ -271,7 +271,8 @@ class Auth(object): else: key = (RoomCreateEvent.TYPE, "", ) create_event = event.old_state_events.get(key) - if create_event.content["creator"] == user_id: + if (create_event is not None and + create_event.content["creator"] == user_id): return 100 return level |