Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #607 from matrix-org/dbkr/send_inviter_member_event
Browse files Browse the repository at this point in the history
Send the invier's member event in room invite state
  • Loading branch information
dbkr committed Feb 26, 2016
2 parents 4bf13a8 + 413e36b commit bfdcc7b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion synapse/handlers/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,12 @@ def handle_new_client_event(self, event, context, ratelimit=True, extra_users=[]

if event.type == EventTypes.Member:
if event.content["membership"] == Membership.INVITE:
def is_inviter_member_event(e):
return (
e.type == EventTypes.Member and
e.sender == event.sender
)

event.unsigned["invite_room_state"] = [
{
"type": e.type,
Expand All @@ -306,7 +312,7 @@ def handle_new_client_event(self, event, context, ratelimit=True, extra_users=[]
EventTypes.CanonicalAlias,
EventTypes.RoomAvatar,
EventTypes.Name,
)
) or is_inviter_member_event(e)
]

invitee = UserID.from_string(event.state_key)
Expand Down

0 comments on commit bfdcc7b

Please sign in to comment.