summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorDavid Baker <dbkr@users.noreply.github.com>2016-02-26 14:32:08 +0000
committerDavid Baker <dbkr@users.noreply.github.com>2016-02-26 14:32:08 +0000
commitbfdcc7b9b64e862178d484f3faa424df34c1e771 (patch)
treecd3bc516ea2df1035ce225b03ef01678da7c59a8 /synapse
parentMerge pull request #609 from matrix-org/markjh/change_action (diff)
parentMerge remote-tracking branch 'origin/develop' into dbkr/send_inviter_member_e... (diff)
downloadsynapse-bfdcc7b9b64e862178d484f3faa424df34c1e771.tar.xz
Merge pull request #607 from matrix-org/dbkr/send_inviter_member_event
Send the invier's member event in room invite state
Diffstat (limited to 'synapse')
-rw-r--r--synapse/handlers/_base.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/synapse/handlers/_base.py b/synapse/handlers/_base.py
index 5613bd2059..bdade98bf7 100644
--- a/synapse/handlers/_base.py
+++ b/synapse/handlers/_base.py
@@ -293,6 +293,12 @@ class BaseHandler(object):
 
         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,
@@ -306,7 +312,7 @@ class BaseHandler(object):
                         EventTypes.CanonicalAlias,
                         EventTypes.RoomAvatar,
                         EventTypes.Name,
-                    )
+                    ) or is_inviter_member_event(e)
                 ]
 
                 invitee = UserID.from_string(event.state_key)