diff options
author | mcalinghee <mcalinghee.dev@gmail.com> | 2024-04-23 17:45:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-23 16:45:24 +0100 |
commit | ae181233aa4c296d5d973eedfc599145ac0d5918 (patch) | |
tree | a972be7d6af088d9296af3ba9787dd7d94b6ab8f /synapse/config | |
parent | Add an OSX prompt to manually configure icu4c. (#17069) (diff) | |
download | synapse-ae181233aa4c296d5d973eedfc599145ac0d5918.tar.xz |
Send an email if the address is already bound to an user account (#16819)
Co-authored-by: Mathieu Velten <mathieu.velten@beta.gouv.fr> Co-authored-by: Olivier D <odelcroi@gmail.com>
Diffstat (limited to 'synapse/config')
-rw-r--r-- | synapse/config/emailconfig.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/synapse/config/emailconfig.py b/synapse/config/emailconfig.py index a4dc9db03e..8033fa2e52 100644 --- a/synapse/config/emailconfig.py +++ b/synapse/config/emailconfig.py @@ -52,6 +52,7 @@ DEFAULT_SUBJECTS = { "invite_from_person_to_space": "[%(app)s] %(person)s has invited you to join the %(space)s space on %(app)s...", "password_reset": "[%(server_name)s] Password reset", "email_validation": "[%(server_name)s] Validate your email", + "email_already_in_use": "[%(server_name)s] Email already in use", } LEGACY_TEMPLATE_DIR_WARNING = """ @@ -76,6 +77,7 @@ class EmailSubjectConfig: invite_from_person_to_space: str password_reset: str email_validation: str + email_already_in_use: str class EmailConfig(Config): @@ -180,6 +182,12 @@ class EmailConfig(Config): registration_template_text = email_config.get( "registration_template_text", "registration.txt" ) + already_in_use_template_html = email_config.get( + "already_in_use_template_html", "already_in_use.html" + ) + already_in_use_template_text = email_config.get( + "already_in_use_template_html", "already_in_use.txt" + ) add_threepid_template_html = email_config.get( "add_threepid_template_html", "add_threepid.html" ) @@ -215,6 +223,8 @@ class EmailConfig(Config): self.email_password_reset_template_text, self.email_registration_template_html, self.email_registration_template_text, + self.email_already_in_use_template_html, + self.email_already_in_use_template_text, self.email_add_threepid_template_html, self.email_add_threepid_template_text, self.email_password_reset_template_confirmation_html, @@ -230,6 +240,8 @@ class EmailConfig(Config): password_reset_template_text, registration_template_html, registration_template_text, + already_in_use_template_html, + already_in_use_template_text, add_threepid_template_html, add_threepid_template_text, "password_reset_confirmation.html", |