mirror of
https://github.com/element-hq/synapse
synced 2024-09-06 11:10:06 +00:00
Add third party invites to auth_events for joins
This commit is contained in:
parent
fcd9ba8802
commit
1cacc71050
1 changed files with 5 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue