From 01c88a09cd6e90fa28c1282a56a08e481727ce20 Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Mon, 13 Sep 2021 13:07:12 -0400 Subject: Use direct references for some configuration variables (#10798) Instead of proxying through the magic getter of the RootConfig object. This should be more performant (and is more explicit). --- synapse/util/templates.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'synapse/util') diff --git a/synapse/util/templates.py b/synapse/util/templates.py index eb3c8c9370..12941065ca 100644 --- a/synapse/util/templates.py +++ b/synapse/util/templates.py @@ -63,12 +63,12 @@ def build_jinja_env( env.filters.update( { "format_ts": _format_ts_filter, - "mxc_to_http": _create_mxc_to_http_filter(config.public_baseurl), + "mxc_to_http": _create_mxc_to_http_filter(config.server.public_baseurl), } ) # common variables for all templates - env.globals.update({"server_name": config.server_name}) + env.globals.update({"server_name": config.server.server_name}) return env -- cgit 1.5.1