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 15:04:17 +0100
committerErik Johnston <erik@matrix.org>2014-10-17 15:04:17 +0100
commitf71627567b4aa58c5aba7e79c6d972b8ac26b449 (patch)
tree08f077bc1cbcc2d84e5783d41b2bbe84fbc3b24c /synapse/api/auth.py
parentStart implementing the invite/join dance. Continue moving auth to use event.s... (diff)
downloadsynapse-f71627567b4aa58c5aba7e79c6d972b8ac26b449.tar.xz
Finish implementing the new join dance.
Diffstat (limited to 'synapse/api/auth.py')
-rw-r--r--synapse/api/auth.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/synapse/api/auth.py b/synapse/api/auth.py
index 12ddef1b00..d1eca791ab 100644
--- a/synapse/api/auth.py
+++ b/synapse/api/auth.py
@@ -48,6 +48,15 @@ class Auth(object):
         """
         try:
             if hasattr(event, "room_id"):
+                if not event.old_state_events:
+                    # Oh, we don't know what the state of the room was, so we
+                    # are trusting that this is allowed (at least for now)
+                    defer.returnValue(True)
+
+                if hasattr(event, "outlier") and event.outlier:
+                    # TODO (erikj): Auth for outliers is done differently.
+                    defer.returnValue(True)
+
                 is_state = hasattr(event, "state_key")
 
                 if event.type == RoomMemberEvent.TYPE: