diff options
author | Amber Brown <hawkowl@atleastfornow.net> | 2019-06-03 21:28:59 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-03 21:28:59 +1000 |
commit | 2889b055543c8db6bf93eaad7035d0eca1ec2874 (patch) | |
tree | 6dde18a9193bb681b5ec014e4ee41b7b85f034c5 /synapse/app/frontend_proxy.py | |
parent | Merge pull request #5309 from matrix-org/rav/limit_displayname_length (diff) | |
download | synapse-2889b055543c8db6bf93eaad7035d0eca1ec2874.tar.xz |
Unify v1 and v2 REST client APIs (#5226)
Diffstat (limited to 'synapse/app/frontend_proxy.py')
-rw-r--r-- | synapse/app/frontend_proxy.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/synapse/app/frontend_proxy.py b/synapse/app/frontend_proxy.py index 8479fee738..6504da5278 100644 --- a/synapse/app/frontend_proxy.py +++ b/synapse/app/frontend_proxy.py @@ -37,8 +37,7 @@ from synapse.replication.slave.storage.client_ips import SlavedClientIpStore from synapse.replication.slave.storage.devices import SlavedDeviceStore from synapse.replication.slave.storage.registration import SlavedRegistrationStore from synapse.replication.tcp.client import ReplicationClientHandler -from synapse.rest.client.v1.base import ClientV1RestServlet, client_path_patterns -from synapse.rest.client.v2_alpha._base import client_v2_patterns +from synapse.rest.client.v2_alpha._base import client_patterns from synapse.server import HomeServer from synapse.storage.engines import create_engine from synapse.util.httpresourcetree import create_resource_tree @@ -49,11 +48,11 @@ from synapse.util.versionstring import get_version_string logger = logging.getLogger("synapse.app.frontend_proxy") -class PresenceStatusStubServlet(ClientV1RestServlet): - PATTERNS = client_path_patterns("/presence/(?P<user_id>[^/]*)/status") +class PresenceStatusStubServlet(RestServlet): + PATTERNS = client_patterns("/presence/(?P<user_id>[^/]*)/status") def __init__(self, hs): - super(PresenceStatusStubServlet, self).__init__(hs) + super(PresenceStatusStubServlet, self).__init__() self.http_client = hs.get_simple_http_client() self.auth = hs.get_auth() self.main_uri = hs.config.worker_main_http_uri @@ -84,7 +83,7 @@ class PresenceStatusStubServlet(ClientV1RestServlet): class KeyUploadServlet(RestServlet): - PATTERNS = client_v2_patterns("/keys/upload(/(?P<device_id>[^/]+))?$") + PATTERNS = client_patterns("/keys/upload(/(?P<device_id>[^/]+))?$") def __init__(self, hs): """ |