Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
fix missing app variable in mail subject
Browse files Browse the repository at this point in the history
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
  • Loading branch information
br4nnigan authored Jan 9, 2022
1 parent 8e57584 commit 8ccb8d4
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions synapse/push/mailer.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,10 @@ async def send_registration_mail(
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,
)

Expand Down Expand Up @@ -209,7 +212,10 @@ async def send_add_threepid_mail(
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,
)

Expand Down

0 comments on commit 8ccb8d4

Please sign in to comment.