emails: Update subject for confirm_new_email to have realm host.

Updates the email subject for confirming an email change to include
the realm host.
This commit is contained in:
Lauryn Menard 2023-07-25 15:26:02 +02:00 committed by Tim Abbott
parent 88e9320fa5
commit 7c618b57cf
3 changed files with 4 additions and 3 deletions

View File

@ -1 +1 @@
{{ _("Verify your new email address") }}
{% trans %}Verify your new email address for {{ organization_host }}{% endtrans %}

View File

@ -149,6 +149,7 @@ def do_start_email_change_process(user_profile: UserProfile, new_email: str) ->
old_email=old_email,
new_email=new_email,
activate_url=activation_url,
organization_host=user_profile.realm.host,
)
language = user_profile.default_language

View File

@ -39,7 +39,7 @@ class EmailChangeTestCase(ZulipTestCase):
email_message = mail.outbox[0]
self.assertEqual(
email_message.subject,
"Verify your new email address",
"Verify your new email address for zulip.testserver",
)
body = email_message.body
self.assertIn("We received a request to change the email", body)
@ -168,7 +168,7 @@ class EmailChangeTestCase(ZulipTestCase):
email_message = mail.outbox[0]
self.assertEqual(
email_message.subject,
"Verify your new email address",
"Verify your new email address for zulip.testserver",
)
body = email_message.body
self.assertIn("We received a request to change the email", body)