Skip to content
Snippets Groups Projects
Unverified Commit 1a63c7c2 authored by Brendan Abolivier's avatar Brendan Abolivier Committed by GitHub
Browse files

Merge pull request #5077 from matrix-org/babolivier/account_expiration

Don't crash on lack of expiry templates
parents f30a882c f8826d31
No related branches found
No related tags found
No related merge requests found
Don't crash on lack of expiry templates.
...@@ -71,8 +71,12 @@ class EmailConfig(Config): ...@@ -71,8 +71,12 @@ class EmailConfig(Config):
self.email_notif_from = email_config["notif_from"] self.email_notif_from = email_config["notif_from"]
self.email_notif_template_html = email_config["notif_template_html"] self.email_notif_template_html = email_config["notif_template_html"]
self.email_notif_template_text = email_config["notif_template_text"] self.email_notif_template_text = email_config["notif_template_text"]
self.email_expiry_template_html = email_config["expiry_template_html"] self.email_expiry_template_html = email_config.get(
self.email_expiry_template_text = email_config["expiry_template_text"] "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") template_dir = email_config.get("template_dir")
# we need an absolute path, because we change directory after starting (and # we need an absolute path, because we change directory after starting (and
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment