summary refs log tree commit diff
path: root/synapse/handlers/room.py
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2016-02-24 16:37:46 +0000
committerMark Haines <mark.haines@matrix.org>2016-02-24 16:37:46 +0000
commit4ecfbac85fd0aa7350ee36a87dac880828e93660 (patch)
tree5ea0ca064548b545c9fbbae2f86fa4121e287766 /synapse/handlers/room.py
parentRemove unused get_rule_attr method (diff)
parentMerge pull request #604 from matrix-org/daniel/guestaccesstoken (diff)
downloadsynapse-4ecfbac85fd0aa7350ee36a87dac880828e93660.tar.xz
Merge branch 'develop' into markjh/dead_code
Diffstat (limited to 'synapse/handlers/room.py')
-rw-r--r--synapse/handlers/room.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py
index eb9700a35b..d2de23a6cc 100644
--- a/synapse/handlers/room.py
+++ b/synapse/handlers/room.py
@@ -848,6 +848,13 @@ class RoomMemberHandler(BaseHandler):
                 user.
         """
 
+        registration_handler = self.hs.get_handlers().registration_handler
+        guest_access_token = yield registration_handler.guest_access_token_for(
+            medium=medium,
+            address=address,
+            inviter_user_id=inviter_user_id,
+        )
+
         is_url = "%s%s/_matrix/identity/api/v1/store-invite" % (
             id_server_scheme, id_server,
         )
@@ -864,6 +871,7 @@ class RoomMemberHandler(BaseHandler):
                 "sender": inviter_user_id,
                 "sender_display_name": inviter_display_name,
                 "sender_avatar_url": inviter_avatar_url,
+                "guest_access_token": guest_access_token,
             }
         )
         # TODO: Check for success