summary refs log tree commit diff
diff options
context:
space:
mode:
authorDavid Robertson <davidr@element.io>2022-01-13 20:19:10 +0000
committerGitHub <noreply@github.com>2022-01-13 20:19:10 +0000
commitd70169bf9b4b4a2e8369ae7bd5af798cb8945fa3 (patch)
treeb93108c63453362284510ee41feb4ba7086507cb
parentInvite PR submitters to credit themselves (#11744) (diff)
downloadsynapse-d70169bf9b4b4a2e8369ae7bd5af798cb8945fa3.tar.xz
Fix missing app variable in mail subject (#11745)
documentation claims that you can use the %(app)s variable in password_reset and email_validation subjects, but if you do you end up with an error 500

Co-authored-by: br4nnigan <10244835+br4nnigan@users.noreply.github.com>
Diffstat (limited to '')
-rw-r--r--changelog.d/11710.bugfix1
-rw-r--r--changelog.d/11745.bugfix1
-rw-r--r--synapse/push/mailer.py4
3 files changed, 4 insertions, 2 deletions
diff --git a/changelog.d/11710.bugfix b/changelog.d/11710.bugfix
new file mode 100644
index 0000000000..6521a37f6e
--- /dev/null
+++ b/changelog.d/11710.bugfix
@@ -0,0 +1 @@
+Fix a bug introduced in Synapse v1.18.0 where password reset and address validation emails would not be sent if their subject was configured to use the 'app' template variable. Contributed by @br4nnigan.
diff --git a/changelog.d/11745.bugfix b/changelog.d/11745.bugfix
new file mode 100644
index 0000000000..6521a37f6e
--- /dev/null
+++ b/changelog.d/11745.bugfix
@@ -0,0 +1 @@
+Fix a bug introduced in Synapse v1.18.0 where password reset and address validation emails would not be sent if their subject was configured to use the 'app' template variable. Contributed by @br4nnigan.
diff --git a/synapse/push/mailer.py b/synapse/push/mailer.py
index ff904c2b4a..dadfc57413 100644
--- a/synapse/push/mailer.py
+++ b/synapse/push/mailer.py
@@ -178,7 +178,7 @@ class Mailer:
         await self.send_email(
             email_address,
             self.email_subjects.email_validation
-            % {"server_name": self.hs.config.server.server_name},
+            % {"server_name": self.hs.config.server.server_name, "app": self.app_name},
             template_vars,
         )
 
@@ -209,7 +209,7 @@ class Mailer:
         await self.send_email(
             email_address,
             self.email_subjects.email_validation
-            % {"server_name": self.hs.config.server.server_name},
+            % {"server_name": self.hs.config.server.server_name, "app": self.app_name},
             template_vars,
         )