Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

emails: Remove demo organization text from account_registered email.

Lauryn Menarda4c0b6072947
diff --git a/templates/zerver/emails/account_registered.html b/templates/zerver/emails/account_registered.html
index 504c9f02bb0..16565017a69 100644
--- a/templates/zerver/emails/account_registered.html
+++ b/templates/zerver/emails/account_registered.html
@@ -6,20 +6,10 @@
{% block content %}
{% if realm_creation %}
-{% if is_demo_organization %}
-<p>
- {% trans demo_organizations_help_link="https://zulip.com/help/demo-organizations" %}Congratulations, you have created a new Zulip demo organization. Note
- that this organization will be automatically deleted in 30 days. Learn more
- about demo organizations <a
- href="{{ demo_organizations_help_link }}">here</a>!
- {% endtrans %}
-</p>
-{% else %}
<p>
{% trans %}Congratulations, you have created a new Zulip
organization: <b>{{ realm_name }}</b>.{% endtrans %}
</p>
-{% endif %}
{% else %}
<p>{{ _('Welcome to Zulip!') }}</p>
<p>
diff --git a/templates/zerver/emails/account_registered.txt b/templates/zerver/emails/account_registered.txt
index 330f665840b..e76fd522e1d 100644
--- a/templates/zerver/emails/account_registered.txt
+++ b/templates/zerver/emails/account_registered.txt
@@ -1,11 +1,7 @@
{{ _('Welcome to Zulip!') }}
{% if realm_creation %}
- {% if is_demo_organization %}
- {% trans demo_organizations_help_link="https://zulip.com/help/demo-organizations" %}Congratulations, you have created a new demo Zulip organization. Note that this organization will be automatically deleted in 30 days. Learn more about demo organizations here: {{ demo_organizations_help_link }}!{% endtrans %}
- {% else %}
- {% trans %}Congratulations, you have created a new Zulip organization: {{ realm_name }}.{% endtrans %}
- {% endif %}
+ {% trans %}Congratulations, you have created a new Zulip organization: {{ realm_name }}.{% endtrans %}
{% else %}
{% trans %}You've joined the Zulip organization {{ realm_name }}.{% endtrans %}
{% endif %}
diff --git a/zerver/lib/email_notifications.py b/zerver/lib/email_notifications.py
index 7ddaffef685..3f120461780 100644
--- a/zerver/lib/email_notifications.py
+++ b/zerver/lib/email_notifications.py
@@ -836,7 +836,6 @@ def send_account_registered_email(user: UserProfile, realm_creation: bool = Fals
realm_creation=realm_creation,
email=user.delivery_email,
is_realm_admin=user.is_realm_admin,
- is_demo_organization=user.realm.demo_organization_scheduled_deletion_date is not None,
)
account_registered_context["getting_organization_started_link"] = (
diff --git a/zerver/tests/test_email_notifications.py b/zerver/tests/test_email_notifications.py
index ff78cd229d9..ee7eeb0db23 100644
--- a/zerver/tests/test_email_notifications.py
+++ b/zerver/tests/test_email_notifications.py
@@ -7,7 +7,6 @@ import orjson
from django.core import mail
from django.core.mail.message import EmailMultiAlternatives
from django.test import override_settings
-from django.utils.timezone import now as timezone_now
from django_auth_ldap.config import LDAPSearch
from zerver.lib.email_notifications import (
@@ -489,40 +488,6 @@ class TestFollowupEmails(ZulipTestCase):
self.assertIn("you have created a new Zulip organization", message.body)
self.assertNotIn("demo org", message.body)
- def test_followup_emails_for_demo_realms(self) -> None:
- cordelia = self.example_user("cordelia")
- cordelia.realm.demo_organization_scheduled_deletion_date = timezone_now() + timedelta(
- days=30
- )
- cordelia.realm.save()
- with self.captureOnCommitCallbacks(execute=True) as callbacks:
- send_account_registered_email(self.example_user("cordelia"), realm_creation=True)
- enqueue_welcome_emails(self.example_user("cordelia"), realm_creation=True)
-
- scheduled_emails = ScheduledEmail.objects.filter(users=cordelia).order_by(
- "scheduled_timestamp"
- )
- self.assert_length(scheduled_emails, 2)
- self.assertEqual(
- orjson.loads(scheduled_emails[0].data)["template_prefix"],
- "zerver/emails/onboarding_zulip_guide",
- )
- self.assertEqual(
- orjson.loads(scheduled_emails[1].data)["template_prefix"],
- "zerver/emails/onboarding_team_to_zulip",
- )
-
- # The insert into the deferred_email_senders queue
- self.assert_length(callbacks, 1)
-
- # Exiting the block does the email-sending
- from django.core.mail import outbox
-
- self.assert_length(outbox, 1)
-
- message = outbox[0]
- self.assertIn("you have created a new demo Zulip organization", message.body)
-
def test_onboarding_zulip_guide_with_invalid_org_type(self) -> None:
cordelia = self.example_user("cordelia")
realm = get_realm("zulip")