summary refs log tree commit diff
path: root/synapse/api/auth.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-10-17 18:56:42 +0100
committerErik Johnston <erik@matrix.org>2014-10-17 18:56:42 +0100
commit5ffe5ab43fa090111a0141b04ce6342172f60724 (patch)
tree45af4a0c2fdbb3c89853645cafe1440b13c6d3f4 /synapse/api/auth.py
parentFinish implementing the new join dance. (diff)
downloadsynapse-5ffe5ab43fa090111a0141b04ce6342172f60724.tar.xz
Use state groups to get current state. Make join dance actually work.
Diffstat (limited to 'synapse/api/auth.py')
-rw-r--r--synapse/api/auth.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/api/auth.py b/synapse/api/auth.py
index d1eca791ab..50ce7eb4cd 100644
--- a/synapse/api/auth.py
+++ b/synapse/api/auth.py
@@ -22,6 +22,7 @@ from synapse.api.errors import AuthError, StoreError, Codes, SynapseError
 from synapse.api.events.room import (
     RoomMemberEvent, RoomPowerLevelsEvent, RoomRedactionEvent,
     RoomJoinRulesEvent, RoomOpsPowerLevelsEvent, InviteJoinEvent,
+    RoomCreateEvent,
 )
 from synapse.util.logutils import log_function
 
@@ -59,6 +60,10 @@ class Auth(object):
 
                 is_state = hasattr(event, "state_key")
 
+                if event.type == RoomCreateEvent.TYPE:
+                    # FIXME
+                    defer.returnValue(True)
+
                 if event.type == RoomMemberEvent.TYPE:
                     yield self._can_replace_state(event)
                     allowed = yield self.is_membership_change_allowed(event)