diff options
author | Erik Johnston <erik@matrix.org> | 2014-10-17 15:04:17 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2014-10-17 15:04:17 +0100 |
commit | f71627567b4aa58c5aba7e79c6d972b8ac26b449 (patch) | |
tree | 08f077bc1cbcc2d84e5783d41b2bbe84fbc3b24c /synapse/api/auth.py | |
parent | Start implementing the invite/join dance. Continue moving auth to use event.s... (diff) | |
download | synapse-f71627567b4aa58c5aba7e79c6d972b8ac26b449.tar.xz |
Finish implementing the new join dance.
Diffstat (limited to 'synapse/api/auth.py')
-rw-r--r-- | synapse/api/auth.py | 9 |
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: |