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

Fix buggy condition in account validity handler (#7074)

parent d8d91983
No related branches found
No related tags found
No related merge requests found
Fix a bug causing account validity renewal emails to be sent even if the feature is turned off in some cases.
...@@ -44,7 +44,11 @@ class AccountValidityHandler(object): ...@@ -44,7 +44,11 @@ class AccountValidityHandler(object):
self._account_validity = self.hs.config.account_validity self._account_validity = self.hs.config.account_validity
if self._account_validity.renew_by_email_enabled and load_jinja2_templates: if (
self._account_validity.enabled
and self._account_validity.renew_by_email_enabled
and load_jinja2_templates
):
# Don't do email-specific configuration if renewal by email is disabled. # Don't do email-specific configuration if renewal by email is disabled.
try: try:
app_name = self.hs.config.email_app_name app_name = self.hs.config.email_app_name
......
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