From d296f29fa7f0a6a3f5429bf0df635fff650538d9 Mon Sep 17 00:00:00 2001 From: Rishi Gupta Date: Thu, 17 Aug 2017 20:33:06 -0700 Subject: [PATCH] emails: Link to organization getting started guide in followup_day1. --- templates/zerver/emails/followup_day1.html | 5 +++++ templates/zerver/emails/followup_day1.txt | 4 +++- zerver/lib/notifications.py | 5 ++++- zerver/views/test_emails.py | 2 ++ 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/templates/zerver/emails/followup_day1.html b/templates/zerver/emails/followup_day1.html index 88c8923c38..9712bc3c01 100644 --- a/templates/zerver/emails/followup_day1.html +++ b/templates/zerver/emails/followup_day1.html @@ -18,6 +18,11 @@ If you're new to Zulip's threading, we recommend starting with the desktop or browser experience, and using mobile for notifications on the go. + {% if is_realm_admin %} + If this is your first Zulip organization, we also recommend giving + our guide for new + admins a spin. + {% endif %}

diff --git a/templates/zerver/emails/followup_day1.txt b/templates/zerver/emails/followup_day1.txt index 2d64589368..e546785b04 100644 --- a/templates/zerver/emails/followup_day1.txt +++ b/templates/zerver/emails/followup_day1.txt @@ -14,7 +14,9 @@ threading, we recommend starting with the desktop or browser experience, and using mobile for notifications on the go. If you have any feedback, or want to see how we use Zulip for managing the -Zulip project itself, swing by https://chat.zulip.org and say hi! +Zulip project itself, swing by https://chat.zulip.org and say hi! {% if is_realm_admin %}If this is +your first Zulip organization, we also recommend checking out +{{ organization_setup_advice_link }}.{% endif %} Cheers, Team Zulip diff --git a/zerver/lib/notifications.py b/zerver/lib/notifications.py index 9ca622291c..d11654f2a3 100644 --- a/zerver/lib/notifications.py +++ b/zerver/lib/notifications.py @@ -416,7 +416,10 @@ def enqueue_welcome_emails(user_id): unsubscribe_link = one_click_unsubscribe_link(user_profile, "welcome") context = common_context(user_profile) context.update({ - 'unsubscribe_link': unsubscribe_link + 'unsubscribe_link': unsubscribe_link, + 'organization_setup_advice_link': + user_profile.realm.uri + '%s/help/getting-your-organization-started-with-zulip', + 'is_realm_admin': user_profile.is_realm_admin, }) send_future_email( "zerver/emails/followup_day1", to_user_id=user_id, from_name=from_name, diff --git a/zerver/views/test_emails.py b/zerver/views/test_emails.py index 4319aea8b9..96d2e1a563 100755 --- a/zerver/views/test_emails.py +++ b/zerver/views/test_emails.py @@ -53,8 +53,10 @@ def email_page(request): 'server_uri': settings.SERVER_URI, 'old_email': 'old_address@acme.com', 'new_email': 'new_address@acme.com', + 'is_realm_admin': True, 'activate_url': '%s/accounts/do_confirm/5348720e4af7d2e8f296cbbd04d439489917ddc0' % (settings.SERVER_URI,), 'unsubscribe_link': '%s/accounts/unsubscribe//cf88931365ef1b0f12eae8d488bbc7af3563d7f0' % (settings.SERVER_URI,), + 'organization_setup_advice_link': '%s/help/getting-your-organization-started-with-zulip' % (settings.SERVER_URI,), } templates = [