Add third party invites to auth_events for joins
This commit is contained in:
parent
fcd9ba8802
commit
1cacc71050
|
@ -677,6 +677,11 @@ class Auth(object):
|
||||||
if e_type == Membership.JOIN:
|
if e_type == Membership.JOIN:
|
||||||
if member_event and not is_public:
|
if member_event and not is_public:
|
||||||
auth_ids.append(member_event.event_id)
|
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:
|
else:
|
||||||
if member_event:
|
if member_event:
|
||||||
auth_ids.append(member_event.event_id)
|
auth_ids.append(member_event.event_id)
|
||||||
|
|
Loading…
Reference in New Issue