diff --git a/templates/zerver/emails/invitation.subject b/templates/zerver/emails/invitation.subject index 76816b371b..fd57077109 100644 --- a/templates/zerver/emails/invitation.subject +++ b/templates/zerver/emails/invitation.subject @@ -1 +1 @@ -{{referrer.full_name}} invited you to join Zulip +{{referrer.full_name}} invited you to join {{ referrer_realm_name }} diff --git a/zerver/lib/actions.py b/zerver/lib/actions.py index 1a1cf5696a..820765c408 100644 --- a/zerver/lib/actions.py +++ b/zerver/lib/actions.py @@ -3053,7 +3053,8 @@ def do_send_confirmation_email(invitee, referrer, body): `referrer` is a UserProfile. """ 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,) send_email('zerver/emails/invitation', invitee.email, from_name=from_name, from_address=FromAddress.NOREPLY, context=context) diff --git a/zerver/tests/test_docs.py b/zerver/tests/test_docs.py index e206d809fc..59ef1399e4 100644 --- a/zerver/tests/test_docs.py +++ b/zerver/tests/test_docs.py @@ -50,7 +50,7 @@ class DocPageTest(ZulipTestCase): self._test('/devtools/', 'Useful development URLs') self._test('/errors/404/', 'Page not found') 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') result = self.client_get('/new-user/') @@ -68,6 +68,7 @@ class DocPageTest(ZulipTestCase): ''.join(str(x) for x in list(result.streaming_content)) ) + class IntegrationTest(TestCase): def test_check_if_every_integration_has_logo_that_exists(self): # type: () -> None