summary refs log tree commit diff
path: root/synapse/api
diff options
context:
space:
mode:
authorDaniel Wagner-Hall <dawagner@gmail.com>2015-10-06 10:13:28 -0500
committerDaniel Wagner-Hall <dawagner@gmail.com>2015-10-06 10:13:28 -0500
commit1cacc71050a44f00ddf2226f907e9b794672671d (patch)
tree02bce3bac451bf9ea92b8300212d5b46197773fd /synapse/api
parentFix lint errors (diff)
downloadsynapse-1cacc71050a44f00ddf2226f907e9b794672671d.tar.xz
Add third party invites to auth_events for joins
Diffstat (limited to '')
-rw-r--r--synapse/api/auth.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/api/auth.py b/synapse/api/auth.py
index 6607d08488..adb9a776e0 100644
--- a/synapse/api/auth.py
+++ b/synapse/api/auth.py
@@ -677,6 +677,11 @@ class Auth(object):
             if e_type == Membership.JOIN:
                 if member_event and not is_public:
                     auth_ids.append(member_event.event_id)
+                if ThirdPartyInvites.has_join_keys(event.content):
+                    key = (EventTypes.ThirdPartyInvite, event.content["token"])
+                    invite = current_state.get(key)
+                    if invite:
+                        auth_ids.append(invite.event_id)
             else:
                 if member_event:
                     auth_ids.append(member_event.event_id)