summary refs log tree commit diff
path: root/synapse/api/auth.py
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2015-09-09 14:12:24 +0100
committerMark Haines <mark.haines@matrix.org>2015-09-09 14:12:24 +0100
commit1d579df66475c342e0bf5fed338808bdbfd03c94 (patch)
tree989fae00cee39ffb9e6a75e3f29183cb0a873687 /synapse/api/auth.py
parentAllow room initialSync for users that have left the room, returning a snapsho... (diff)
downloadsynapse-1d579df66475c342e0bf5fed338808bdbfd03c94.tar.xz
Allow rooms/{roomId}/state for a room that has been left
Diffstat (limited to 'synapse/api/auth.py')
-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 9b614a12bb..d8bb64a4af 100644
--- a/synapse/api/auth.py
+++ b/synapse/api/auth.py
@@ -160,8 +160,9 @@ class Auth(object):
                 event_type=EventTypes.Member,
                 state_key=user_id
             )
+        membership = member.membership if member else None
 
-        if not member:
+        if membership not in (Membership.JOIN, Membership.LEAVE):
             raise AuthError(403, "User %s not in room %s" % (
                 user_id, room_id
             ))