diff options
author | Kegan Dougal <kegan@matrix.org> | 2014-08-13 13:50:01 +0100 |
---|---|---|
committer | Kegan Dougal <kegan@matrix.org> | 2014-08-13 13:50:01 +0100 |
commit | 7f40fa1d4601960e8c1ea39af26a3e7515ff0f3e (patch) | |
tree | 759a6669ff412bc27b3ea57871e4a14fa418106e /synapse/server.py | |
parent | Merge branch 'master' of github.com:matrix-org/synapse (diff) | |
download | synapse-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/server.py')
-rw-r--r-- | synapse/server.py | 14 |
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) |