summary refs log tree commit diff
path: root/synapse/handlers/room.py
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2016-03-07 17:13:56 +0000
committerDavid Baker <dave@matrix.org>2016-03-07 17:13:56 +0000
commit874fd432575044c6cd93ee4f311412f677e6b7fe (patch)
treefb7efe8bd29f7fa68a9557dd8aa5056056ac7973 /synapse/handlers/room.py
parentMerge pull request #626 from matrix-org/erikj/visibility (diff)
downloadsynapse-874fd432575044c6cd93ee4f311412f677e6b7fe.tar.xz
Send the user ID matching the guest access token, since there is no Matrix API to discover what user ID an access token is for.
Diffstat (limited to '')
-rw-r--r--synapse/handlers/room.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py
index 0cb6c521c4..57113ae4a5 100644
--- a/synapse/handlers/room.py
+++ b/synapse/handlers/room.py
@@ -884,6 +884,10 @@ class RoomMemberHandler(BaseHandler):
             inviter_user_id=inviter_user_id,
         )
 
+        guest_user_info = yield self.hs.get_auth().get_user_by_access_token(
+            guest_access_token
+        )
+
         is_url = "%s%s/_matrix/identity/api/v1/store-invite" % (
             id_server_scheme, id_server,
         )
@@ -900,6 +904,7 @@ class RoomMemberHandler(BaseHandler):
                 "sender": inviter_user_id,
                 "sender_display_name": inviter_display_name,
                 "sender_avatar_url": inviter_avatar_url,
+                "guest_user_id": guest_user_info["user"].to_string(),
                 "guest_access_token": guest_access_token,
             }
         )