diff options
author | Daniel Wagner-Hall <dawagner@gmail.com> | 2015-10-06 10:13:28 -0500 |
---|---|---|
committer | Daniel Wagner-Hall <dawagner@gmail.com> | 2015-10-06 10:13:28 -0500 |
commit | 1cacc71050a44f00ddf2226f907e9b794672671d (patch) | |
tree | 02bce3bac451bf9ea92b8300212d5b46197773fd | |
parent | Fix lint errors (diff) | |
download | synapse-1cacc71050a44f00ddf2226f907e9b794672671d.tar.xz |
Add third party invites to auth_events for joins
-rw-r--r-- | synapse/api/auth.py | 5 |
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) |