summary refs log tree commit diff
path: root/synapse/server.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/server.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 '')
-rw-r--r--synapse/server.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/synapse/server.py b/synapse/server.py
index 4ba203ac38..ba9022f323 100644
--- a/synapse/server.py
+++ b/synapse/server.py
@@ -171,7 +171,13 @@ class HomeServer(BaseHomeServer):
     def build_distributor(self):
         return Distributor()
 
-    def register_servlets(self):
-        """Simply building the ServletFactory is sufficient to have it
-        register."""
-        self.get_rest_servlet_factory()
+    def register_servlets(self, host_web_client):
+        """ Register all servlets associated with this HomeServer.
+
+        Args:
+            host_web_client (bool): True to host the web client as well.
+        """
+        # Simply building the ServletFactory is sufficient to have it register
+        factory = self.get_rest_servlet_factory()
+        if host_web_client:
+            factory.register_web_client(self)