emails: Update subject for invitation emails.

This commit is contained in:
James Rowan 2017-07-13 18:38:12 -07:00 committed by Rishi Gupta
parent 88b8d98d34
commit 71bc40d829
3 changed files with 5 additions and 3 deletions

View File

@ -1 +1 @@
{{referrer.full_name}} invited you to join Zulip {{referrer.full_name}} invited you to join {{ referrer_realm_name }}

View File

@ -3053,7 +3053,8 @@ def do_send_confirmation_email(invitee, referrer, body):
`referrer` is a UserProfile. `referrer` is a UserProfile.
""" """
activation_url = Confirmation.objects.get_link_for_object(invitee, referrer.realm.host) activation_url = Confirmation.objects.get_link_for_object(invitee, referrer.realm.host)
context = {'referrer': referrer, 'custom_body': body, 'activate_url': activation_url} context = {'referrer': referrer, 'custom_body': body, 'activate_url': activation_url,
'referrer_realm_name': referrer.realm.name}
from_name = u"%s (via Zulip)" % (referrer.full_name,) from_name = u"%s (via Zulip)" % (referrer.full_name,)
send_email('zerver/emails/invitation', invitee.email, from_name=from_name, send_email('zerver/emails/invitation', invitee.email, from_name=from_name,
from_address=FromAddress.NOREPLY, context=context) from_address=FromAddress.NOREPLY, context=context)

View File

@ -50,7 +50,7 @@ class DocPageTest(ZulipTestCase):
self._test('/devtools/', 'Useful development URLs') self._test('/devtools/', 'Useful development URLs')
self._test('/errors/404/', 'Page not found') self._test('/errors/404/', 'Page not found')
self._test('/errors/5xx/', 'Internal server error') self._test('/errors/5xx/', 'Internal server error')
self._test('/emails/', 'Road Runner invited you to join Zulip') self._test('/emails/', 'Road Runner invited you to join Acme Corporation')
self._test('/register/', 'Sign up for Zulip') self._test('/register/', 'Sign up for Zulip')
result = self.client_get('/new-user/') result = self.client_get('/new-user/')
@ -68,6 +68,7 @@ class DocPageTest(ZulipTestCase):
''.join(str(x) for x in list(result.streaming_content)) ''.join(str(x) for x in list(result.streaming_content))
) )
class IntegrationTest(TestCase): class IntegrationTest(TestCase):
def test_check_if_every_integration_has_logo_that_exists(self): def test_check_if_every_integration_has_logo_that_exists(self):
# type: () -> None # type: () -> None