summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2020-12-18 11:01:57 -0500
committerGitHub <noreply@github.com>2020-12-18 11:01:57 -0500
commit56e00ca85e502247112a95ab8c452c83ab5fc4b0 (patch)
tree218165e2312491057446e9ea61b90a6ce4b1e4e2 /synapse/handlers
parentAllow server admin to get admin bit in rooms where local user is an admin (#8... (diff)
downloadsynapse-56e00ca85e502247112a95ab8c452c83ab5fc4b0.tar.xz
Send the location of the web client to the IS when inviting via 3PIDs. (#8930)
Adds a new setting `email.invite_client_location` which, if defined, is
passed to the identity server during invites.
Diffstat (limited to '')
-rw-r--r--synapse/handlers/identity.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/handlers/identity.py b/synapse/handlers/identity.py
index 7301c24710..c05036ad1f 100644
--- a/synapse/handlers/identity.py
+++ b/synapse/handlers/identity.py
@@ -55,6 +55,8 @@ class IdentityHandler(BaseHandler):
         self.federation_http_client = hs.get_federation_http_client()
         self.hs = hs
 
+        self._web_client_location = hs.config.invite_client_location
+
     async def threepid_from_creds(
         self, id_server: str, creds: Dict[str, str]
     ) -> Optional[JsonDict]:
@@ -803,6 +805,9 @@ class IdentityHandler(BaseHandler):
             "sender_display_name": inviter_display_name,
             "sender_avatar_url": inviter_avatar_url,
         }
+        # If a custom web client location is available, include it in the request.
+        if self._web_client_location:
+            invite_config["org.matrix.web_client_location"] = self._web_client_location
 
         # Add the identity service access token to the JSON body and use the v2
         # Identity Service endpoints if id_access_token is present