summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2014-11-18 15:43:17 +0000
committerMark Haines <mark.haines@matrix.org>2014-11-18 15:43:17 +0000
commit3553101eb31666742d7f3c3480a69637feb81104 (patch)
treee474841b809b92a3838c63f1fe0a5248d601a501 /synapse
parentSYN-149: Enable auth for events added during room creation since they should ... (diff)
downloadsynapse-3553101eb31666742d7f3c3480a69637feb81104.tar.xz
Null check when determining default power levels
Diffstat (limited to 'synapse')
-rw-r--r--synapse/api/auth.py3
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