summary refs log tree commit diff
path: root/synapse/api/auth.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-09-05 21:35:56 +0100
committerErik Johnston <erik@matrix.org>2014-09-05 21:35:56 +0100
commit9dd4570b68fea123fda216b8fc8625fafc9d8e0a (patch)
treebf87c16f720a7ad34d29d4b2a8b462506c919624 /synapse/api/auth.py
parentMerge branch 'develop' of github.com:matrix-org/synapse into develop (diff)
downloadsynapse-9dd4570b68fea123fda216b8fc8625fafc9d8e0a.tar.xz
Generate m.room.aliases event when the HS creates a room alias
Diffstat (limited to 'synapse/api/auth.py')
-rw-r--r--synapse/api/auth.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/synapse/api/auth.py b/synapse/api/auth.py
index 5d7c607702..df61794551 100644
--- a/synapse/api/auth.py
+++ b/synapse/api/auth.py
@@ -327,6 +327,11 @@ class Auth(object):
             event.state_key,
         )
 
+        if not current_state:
+            return
+        else:
+            current_state = current_state[0]
+
         user_level = yield self.store.get_power_level(
             event.room_id,
             event.user_id,
@@ -341,7 +346,7 @@ class Auth(object):
 
         # FIXME (erikj)
         old_people = {k: v for k, v in old_list.items() if k.startswith("@")}
-        new_people = {k: v for k, v in event.content if k.startswith("@")}
+        new_people = {k: v for k, v in event.content.items() if k.startswith("@")}
 
         removed = set(old_people.keys()) - set(new_people.keys())
         added = set(old_people.keys()) - set(new_people.keys())