summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-12-12 10:42:27 +0000
committerErik Johnston <erik@matrix.org>2014-12-12 10:42:27 +0000
commitfa4b610ae383bdced11068832d880d14b1df576d (patch)
treeb105b44c4c1e317d45c06b9df5eb2a4e2a7ea267 /synapse
parentMerge branch 'develop' of github.com:matrix-org/synapse into events_refactor (diff)
downloadsynapse-fa4b610ae383bdced11068832d880d14b1df576d.tar.xz
Fix stream test. Make sure we add join to auth_events for invitiations
Diffstat (limited to 'synapse')
-rw-r--r--synapse/api/auth.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/synapse/api/auth.py b/synapse/api/auth.py
index cd0deeb0e6..c76f5180f6 100644
--- a/synapse/api/auth.py
+++ b/synapse/api/auth.py
@@ -61,6 +61,8 @@ class Auth(object):
             if event.type == RoomAliasesEvent.TYPE:
                 return True
 
+            logger.debug("Auth events: %s", auth_events)
+
             if event.type == RoomMemberEvent.TYPE:
                 allowed = self.is_membership_change_allowed(
                     event, auth_events
@@ -389,8 +391,12 @@ class Auth(object):
                 if join_rule_event:
                     auth_ids.append(join_rule_event.event_id)
 
+            if e_type == Membership.JOIN:
                 if member_event and not is_public:
                     auth_ids.append(member_event.event_id)
+            else:
+                if member_event:
+                    auth_ids.append(member_event.event_id)
         elif member_event:
             if member_event.content["membership"] == Membership.JOIN:
                 auth_ids.append(member_event.event_id)