diff --git a/synapse/config/registration.py b/synapse/config/registration.py
index 40ce4d2762..043d11545f 100644
--- a/synapse/config/registration.py
+++ b/synapse/config/registration.py
@@ -146,9 +146,9 @@ class RegistrationConfig(Config):
# If specified, attempt to replay registrations, profile changes & 3pid
# bindings on the given target homeserver via the AS API. The HS is authed
# via a given AS token.
- # shadow-server:
- # hs: https://shadow.example.com
- # as-token: 12u394refgbdhivsia
+ # shadow_server:
+ # hs_url: https://shadow.example.com
+ # as_token: 12u394refgbdhivsia
# If enabled, don't let users set their own display names/avatars
# other than for the very first time (unless they are a server admin).
diff --git a/synapse/handlers/register.py b/synapse/handlers/register.py
index d4d790b3e4..044df53d6e 100644
--- a/synapse/handlers/register.py
+++ b/synapse/handlers/register.py
@@ -435,12 +435,12 @@ class RegistrationHandler(BaseHandler):
"""
# TODO: retries
- shadow_hs = self.hs.config.shadow_server.get("hs")
+ shadow_hs_url = self.hs.config.shadow_server.get("hs_url")
as_token = self.hs.config.shadow_server.get("as_token")
yield self.http_client.post_urlencoded_get_json(
- "https://%s%s" % (
- shadow_hs, "/_matrix/client/r0/register"
+ "%s%s" % (
+ shadow_hs_url, "/_matrix/client/r0/register"
),
{
# XXX: auth_result is an unspecified extension for shadow registration
diff --git a/synapse/rest/client/v1/profile.py b/synapse/rest/client/v1/profile.py
index 7ced5cda11..a95c903688 100644
--- a/synapse/rest/client/v1/profile.py
+++ b/synapse/rest/client/v1/profile.py
@@ -71,13 +71,13 @@ class ProfileDisplaynameRestServlet(ClientV1RestServlet):
@defer.inlineCallbacks
def shadow_displayname(self, user_id, body):
# TODO: retries
- shadow_hs = self.hs.config.shadow_server.get("hs")
+ shadow_hs_url = self.hs.config.shadow_server.get("hs_url")
as_token = self.hs.config.shadow_server.get("as_token")
body['access_token'] = as_token
yield self.http_client.post_urlencoded_get_json(
- "https://%s%s" % (
- shadow_hs, ("/_matrix/client/r0/profile/%s/displayname" % user_id)
+ "%s%s" % (
+ shadow_hs_url, ("/_matrix/client/r0/profile/%s/displayname" % user_id)
),
body
)
@@ -134,13 +134,13 @@ class ProfileAvatarURLRestServlet(ClientV1RestServlet):
@defer.inlineCallbacks
def shadow_avatar_url(self, user_id, body):
# TODO: retries
- shadow_hs = self.hs.config.shadow_server.get("hs")
+ shadow_hs_url = self.hs.config.shadow_server.get("hs_url")
as_token = self.hs.config.shadow_server.get("as_token")
body['access_token'] = as_token
yield self.http_client.post_urlencoded_get_json(
- "https://%s%s" % (
- shadow_hs, ("/_matrix/client/r0/profile/%s/avatar_url" % user_id)
+ "%s%s" % (
+ shadow_hs_url, ("/_matrix/client/r0/profile/%s/avatar_url" % user_id)
),
body
)
diff --git a/synapse/rest/client/v2_alpha/account.py b/synapse/rest/client/v2_alpha/account.py
index daced72e56..4d0e13f2cc 100644
--- a/synapse/rest/client/v2_alpha/account.py
+++ b/synapse/rest/client/v2_alpha/account.py
@@ -189,13 +189,13 @@ class PasswordRestServlet(RestServlet):
@defer.inlineCallbacks
def shadow_password(self, body):
# TODO: retries
- shadow_hs = self.hs.config.shadow_server.get("hs")
+ shadow_hs_url = self.hs.config.shadow_server.get("hs_url")
as_token = self.hs.config.shadow_server.get("as_token")
body['access_token'] = as_token
yield self.http_client.post_urlencoded_get_json(
- "https://%s%s" % (
- shadow_hs, "/_matrix/client/r0/account/password"
+ "%s%s" % (
+ shadow_hs_url, "/_matrix/client/r0/account/password"
),
body
)
@@ -401,13 +401,13 @@ class ThreepidRestServlet(RestServlet):
@defer.inlineCallbacks
def shadow_3pid(self, body):
# TODO: retries
- shadow_hs = self.hs.config.shadow_server.get("hs")
+ shadow_hs_url = self.hs.config.shadow_server.get("hs_url")
as_token = self.hs.config.shadow_server.get("as_token")
body['access_token'] = as_token
yield self.http_client.post_urlencoded_get_json(
- "https://%s%s" % (
- shadow_hs, "/_matrix/client/r0/account/3pid"
+ "%s%s" % (
+ shadow_hs_url, "/_matrix/client/r0/account/3pid"
),
body
)
@@ -460,13 +460,13 @@ class ThreepidDeleteRestServlet(RestServlet):
@defer.inlineCallbacks
def shadow_3pid_delete(self, body):
# TODO: retries
- shadow_hs = self.hs.config.shadow_server.get("hs")
+ shadow_hs_url = self.hs.config.shadow_server.get("hs_url")
as_token = self.hs.config.shadow_server.get("as_token")
body['access_token'] = as_token
yield self.http_client.post_urlencoded_get_json(
- "https://%s%s" % (
- shadow_hs, "/_matrix/client/r0/account/3pid/delete"
+ "%s%s" % (
+ shadow_hs_url, "/_matrix/client/r0/account/3pid/delete"
),
body
)
|