summary refs log tree commit diff
path: root/synapse/module_api/__init__.py
diff options
context:
space:
mode:
authorBrendan Abolivier <babolivier@matrix.org>2021-08-17 12:23:14 +0200
committerGitHub <noreply@github.com>2021-08-17 10:23:14 +0000
commitae2714c1f31f2a843e19dc44501784401181162c (patch)
tree8b06ce2839ea5617ec55b61c834c5e3f7b1df1f1 /synapse/module_api/__init__.py
parentAdd an admin API to check if a username is available (#10578) (diff)
downloadsynapse-ae2714c1f31f2a843e19dc44501784401181162c.tar.xz
Allow using several custom template directories (#10587)
Allow using several directories in read_templates.
Diffstat (limited to 'synapse/module_api/__init__.py')
-rw-r--r--synapse/module_api/__init__.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/synapse/module_api/__init__.py b/synapse/module_api/__init__.py
index 1cc13fc97b..82725853bc 100644
--- a/synapse/module_api/__init__.py
+++ b/synapse/module_api/__init__.py
@@ -677,7 +677,10 @@ class ModuleApi:
             A list containing the loaded templates, with the orders matching the one of
             the filenames parameter.
         """
-        return self._hs.config.read_templates(filenames, custom_template_directory)
+        return self._hs.config.read_templates(
+            filenames,
+            (td for td in (custom_template_directory,) if td),
+        )
 
 
 class PublicRoomListManager: