diff options
author | Andrew Morgan <andrew@amorgan.xyz> | 2020-04-21 18:58:10 +0100 |
---|---|---|
committer | Andrew Morgan <andrew@amorgan.xyz> | 2020-04-21 18:58:10 +0100 |
commit | 67c6de2caa1ba0f50b11ba0b158e056391cad9c3 (patch) | |
tree | 05e8468e2f789b89bf375ba3f86d60f687154440 /synapse/rest | |
parent | Consolidate id_server URL translation (diff) | |
download | synapse-67c6de2caa1ba0f50b11ba0b158e056391cad9c3.tar.xz |
Remove unnecessary shadow server code
Diffstat (limited to 'synapse/rest')
-rw-r--r-- | synapse/rest/client/v2_alpha/account.py | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/synapse/rest/client/v2_alpha/account.py b/synapse/rest/client/v2_alpha/account.py index c99cce5e87..ec120d858c 100644 --- a/synapse/rest/client/v2_alpha/account.py +++ b/synapse/rest/client/v2_alpha/account.py @@ -793,29 +793,6 @@ class ThreepidBindRestServlet(RestServlet): return 200, {} - if self.hs.config.shadow_server: - shadow_user = UserID( - requester.user.localpart, self.hs.config.shadow_server.get("hs") - ) - threepid = { - "medium": validation_session["medium"], - "address": validation_session["address"], - "validated_at": validation_session["validated_at"], - } - self.shadow_3pid({"threepid": threepid}, shadow_user.to_string()) - - @defer.inlineCallbacks - def shadow_3pid(self, body, user_id): - # TODO: retries - 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_json_get_json( - "%s/_matrix/client/r0/account/3pid?access_token=%s&user_id=%s" - % (shadow_hs_url, as_token, user_id), - body, - ) - class ThreepidUnbindRestServlet(RestServlet): PATTERNS = client_patterns("/account/3pid/unbind$", releases=(), unstable=True) |