summary refs log tree commit diff
path: root/synapse/rest/__init__.py
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2014-08-13 13:50:01 +0100
committerKegan Dougal <kegan@matrix.org>2014-08-13 13:50:01 +0100
commit7f40fa1d4601960e8c1ea39af26a3e7515ff0f3e (patch)
tree759a6669ff412bc27b3ea57871e4a14fa418106e /synapse/rest/__init__.py
parentMerge branch 'master' of github.com:matrix-org/synapse (diff)
downloadsynapse-7f40fa1d4601960e8c1ea39af26a3e7515ff0f3e.tar.xz
Added a -w flag which will host the web client if specified. Currently this just delegates to the webclient RestServlet.
Diffstat (limited to 'synapse/rest/__init__.py')
-rw-r--r--synapse/rest/__init__.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/synapse/rest/__init__.py b/synapse/rest/__init__.py
index b7f0c1fd2e..74a372e2ff 100644
--- a/synapse/rest/__init__.py
+++ b/synapse/rest/__init__.py
@@ -15,9 +15,11 @@
 
 
 from . import (
-    room, events, register, login, profile, public, presence, im, directory
+    room, events, register, login, profile, public, presence, im, directory,
+    webclient
 )
 
+
 class RestServletFactory(object):
 
     """ A factory for creating REST servlets.
@@ -42,3 +44,7 @@ class RestServletFactory(object):
         presence.register_servlets(hs, http_server)
         im.register_servlets(hs, http_server)
         directory.register_servlets(hs, http_server)
+
+    def register_web_client(self, hs):
+        http_server = hs.get_http_server()
+        webclient.register_servlets(hs, http_server)