mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-09-21 23:54:35 -04:00
Wire up the webclient option
It existed but was hardcoded to True. Give it an underscore for consistency. Also don't pull in syweb unless we're actually using the web client.
This commit is contained in:
parent
3f7a31d366
commit
7564dac8cb
3 changed files with 24 additions and 8 deletions
|
@ -60,7 +60,6 @@ import re
|
|||
import resource
|
||||
import subprocess
|
||||
import sqlite3
|
||||
import syweb
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
@ -83,6 +82,7 @@ class SynapseHomeServer(HomeServer):
|
|||
return AppServiceRestResource(self)
|
||||
|
||||
def build_resource_for_web_client(self):
|
||||
import syweb
|
||||
syweb_path = os.path.dirname(syweb.__file__)
|
||||
webclient_path = os.path.join(syweb_path, "webclient")
|
||||
return File(webclient_path) # TODO configurable?
|
||||
|
@ -130,7 +130,7 @@ class SynapseHomeServer(HomeServer):
|
|||
True.
|
||||
"""
|
||||
config = self.get_config()
|
||||
web_client = config.webclient
|
||||
web_client = config.web_client
|
||||
|
||||
# list containing (path_str, Resource) e.g:
|
||||
# [ ("/aaa/bbb/cc", Resource1), ("/aaa/dummy", Resource2) ]
|
||||
|
@ -343,7 +343,8 @@ def setup(config_options):
|
|||
|
||||
config.setup_logging()
|
||||
|
||||
check_requirements()
|
||||
# check any extra requirements we have now we have a config
|
||||
check_requirements(config)
|
||||
|
||||
version_string = get_version_string()
|
||||
|
||||
|
@ -450,6 +451,7 @@ def run(hs):
|
|||
|
||||
def main():
|
||||
with LoggingContext("main"):
|
||||
# check base requirements
|
||||
check_requirements()
|
||||
hs = setup(sys.argv[1:])
|
||||
run(hs)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue