summary refs log tree commit diff
path: root/synapse/api/auth.py
diff options
context:
space:
mode:
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
             ))