diff options
author | David Baker <dbkr@matrix.org> | 2014-11-20 14:01:41 +0000 |
---|---|---|
committer | David Baker <dbkr@matrix.org> | 2014-11-20 14:01:41 +0000 |
commit | ebf6c08a472073780b62fb6f222b664f553e1782 (patch) | |
tree | 07ee18b241aa2efe4df3bfcb12bd5f81b7cb0a71 /synapse/handlers | |
parent | remove random half-line (diff) | |
parent | Refactor the HTTP clients a little. (diff) | |
download | synapse-ebf6c08a472073780b62fb6f222b664f553e1782.tar.xz |
Merge branch 'http_client_refactor' into pushers
Diffstat (limited to 'synapse/handlers')
-rw-r--r-- | synapse/handlers/directory.py | 2 | ||||
-rw-r--r-- | synapse/handlers/login.py | 4 | ||||
-rw-r--r-- | synapse/handlers/register.py | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/synapse/handlers/directory.py b/synapse/handlers/directory.py index ed9b0f8551..05e5c6ecfc 100644 --- a/synapse/handlers/directory.py +++ b/synapse/handlers/directory.py @@ -128,7 +128,7 @@ class DirectoryHandler(BaseHandler): "servers": result.servers, }) else: - raise SynapseError(404, "Room alias \"%s\" not found", room_alias) + raise SynapseError(404, "Room alias \"%s\" not found" % (room_alias,)) @defer.inlineCallbacks diff --git a/synapse/handlers/login.py b/synapse/handlers/login.py index 99d15261d4..1204dc3b8f 100644 --- a/synapse/handlers/login.py +++ b/synapse/handlers/login.py @@ -17,7 +17,7 @@ from twisted.internet import defer from ._base import BaseHandler from synapse.api.errors import LoginError, Codes -from synapse.http.client import IdentityServerHttpClient +from synapse.http.client import SimpleHttpClient from synapse.util.emailutils import EmailException import synapse.util.emailutils as emailutils @@ -97,7 +97,7 @@ class LoginHandler(BaseHandler): @defer.inlineCallbacks def _query_email(self, email): - httpCli = IdentityServerHttpClient(self.hs) + httpCli = SimpleHttpClient(self.hs) data = yield httpCli.get_json( 'matrix.org:8090', # TODO FIXME This should be configurable. "/_matrix/identity/api/v1/lookup?medium=email&address=" + diff --git a/synapse/handlers/register.py b/synapse/handlers/register.py index 7df9d9b82d..a39230bc76 100644 --- a/synapse/handlers/register.py +++ b/synapse/handlers/register.py @@ -22,7 +22,7 @@ from synapse.api.errors import ( ) from ._base import BaseHandler import synapse.util.stringutils as stringutils -from synapse.http.client import IdentityServerHttpClient +from synapse.http.client import SimpleHttpClient from synapse.http.client import CaptchaServerHttpClient import base64 @@ -159,7 +159,7 @@ class RegistrationHandler(BaseHandler): def _threepid_from_creds(self, creds): # TODO: get this from the homeserver rather than creating a new one for # each request - httpCli = IdentityServerHttpClient(self.hs) + httpCli = SimpleHttpClient(self.hs) # XXX: make this configurable! trustedIdServers = ['matrix.org:8090'] if not creds['idServer'] in trustedIdServers: @@ -178,7 +178,7 @@ class RegistrationHandler(BaseHandler): @defer.inlineCallbacks def _bind_threepid(self, creds, mxid): - httpCli = IdentityServerHttpClient(self.hs) + httpCli = SimpleHttpClient(self.hs) data = yield httpCli.post_urlencoded_get_json( creds['idServer'], "/_matrix/identity/api/v1/3pid/bind", |