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:
|