summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorBrendan Abolivier <contact@brendanabolivier.com>2019-04-18 15:10:06 +0100
committerGitHub <noreply@github.com>2019-04-18 15:10:06 +0100
commit1a63c7c281473e803bc35a108b2936daa392e399 (patch)
treebbec6cf291f8776dc94a51abbe8aa1495fd89b13 /synapse
parentMerge remote-tracking branch 'origin/master' into develop (diff)
parentDon't crash on lack of expiry templates (diff)
downloadsynapse-1a63c7c281473e803bc35a108b2936daa392e399.tar.xz
Merge pull request #5077 from matrix-org/babolivier/account_expiration
Don't crash on lack of expiry templates
Diffstat (limited to 'synapse')
-rw-r--r--synapse/config/emailconfig.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/synapse/config/emailconfig.py b/synapse/config/emailconfig.py
index 60827be72f..342a6ce5fd 100644
--- a/synapse/config/emailconfig.py
+++ b/synapse/config/emailconfig.py
@@ -71,8 +71,12 @@ class EmailConfig(Config):
             self.email_notif_from = email_config["notif_from"]
             self.email_notif_template_html = email_config["notif_template_html"]
             self.email_notif_template_text = email_config["notif_template_text"]
-            self.email_expiry_template_html = email_config["expiry_template_html"]
-            self.email_expiry_template_text = email_config["expiry_template_text"]
+            self.email_expiry_template_html = email_config.get(
+                "expiry_template_html", "notice_expiry.html",
+            )
+            self.email_expiry_template_text = email_config.get(
+                "expiry_template_text", "notice_expiry.txt",
+            )
 
             template_dir = email_config.get("template_dir")
             # we need an absolute path, because we change directory after starting (and