summary refs log tree commit diff
path: root/synapse/app
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2015-01-23 18:49:05 +0000
committerMark Haines <mark.haines@matrix.org>2015-01-23 18:49:05 +0000
commit2b1799883db3facf63b7982a0302542082414974 (patch)
treee2b1173803448511b04520dbc9e046881691eaff /synapse/app
parentStart implementing the v2_alpha sync API (diff)
downloadsynapse-2b1799883db3facf63b7982a0302542082414974.tar.xz
Add client v2_alpha resource to synapse server resource tree
Diffstat (limited to 'synapse/app')
-rwxr-xr-xsynapse/app/homeserver.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py
index fabe8ddacb..40d28dcbdc 100755
--- a/synapse/app/homeserver.py
+++ b/synapse/app/homeserver.py
@@ -32,12 +32,13 @@ from synapse.http.server_key_resource import LocalKey
 from synapse.http.matrixfederationclient import MatrixFederationHttpClient
 from synapse.api.urls import (
     CLIENT_PREFIX, FEDERATION_PREFIX, WEB_CLIENT_PREFIX, CONTENT_REPO_PREFIX,
-    SERVER_KEY_PREFIX, MEDIA_PREFIX
+    SERVER_KEY_PREFIX, MEDIA_PREFIX, CLIENT_V2_ALPHA_PREFIX,
 )
 from synapse.config.homeserver import HomeServerConfig
 from synapse.crypto import context_factory
 from synapse.util.logcontext import LoggingContext
 from synapse.rest.client.v1 import ClientV1RestResource
+from synapse.rest.client.v2_alpha import ClientV2AlphaRestResource
 
 from daemonize import Daemonize
 import twisted.manhole.telnet
@@ -62,6 +63,9 @@ class SynapseHomeServer(HomeServer):
     def build_resource_for_client(self):
         return ClientV1RestResource(self)
 
+    def build_resource_for_client_v2_alpha(self):
+        return ClientV2AlphaRestResource(self)
+
     def build_resource_for_federation(self):
         return JsonResource()
 
@@ -105,6 +109,7 @@ class SynapseHomeServer(HomeServer):
         # [ ("/aaa/bbb/cc", Resource1), ("/aaa/dummy", Resource2) ]
         desired_tree = [
             (CLIENT_PREFIX, self.get_resource_for_client()),
+            (CLIENT_V2_ALPHA_PREFIX, self.get_resource_for_client_v2_alpha()),
             (FEDERATION_PREFIX, self.get_resource_for_federation()),
             (CONTENT_REPO_PREFIX, self.get_resource_for_content_repo()),
             (SERVER_KEY_PREFIX, self.get_resource_for_server_key()),