zulip_news: Update the group DM sent initially to admins.

As a part of the zulip news feature, we send an initial
group DM to admins suggesting them to update or set
the 'zulip_update_announcements_stream'.

This commit updates those messages to make it better.
This commit is contained in:
Prakhar Pratyush 2024-03-23 06:03:11 +05:30 committed by Tim Abbott
parent c53a96a7b0
commit b9d9676b43
2 changed files with 8 additions and 7 deletions

View File

@ -74,21 +74,22 @@ def internal_prep_group_direct_message_for_old_realm(
topic_name = str(realm.ZULIP_UPDATE_ANNOUNCEMENTS_TOPIC_NAME)
if realm.zulip_update_announcements_stream is None:
content = """\
You can now [configure]({organization_settings_url}) a stream where Zulip \
will send [updates]({zulip_update_announcements_help_url}) about new Zulip features. \
These notifications are currently turned off in your organization.
Zulip now supports [configuring]({organization_settings_url}) a stream where Zulip will \
send [updates]({zulip_update_announcements_help_url}) about new Zulip features. \
These notifications are currently turned off in your organization. If you configure \
a stream within one week, your organization will not miss any update messages.
""".format(
zulip_update_announcements_help_url="/help/configure-automated-notices#zulip-update-announcements",
organization_settings_url="/#organization/organization-settings",
)
else:
content = """\
Users in your organization will now receive [updates]({zulip_update_announcements_help_url}) \
Starting tomorrow, users in your organization will receive [updates]({zulip_update_announcements_help_url}) \
about new Zulip features in #**{zulip_update_announcements_stream}>{topic_name}**.
If you like, you can [configure]({organization_settings_url}) a different stream for \
these updates (and [move]({move_content_another_stream_help_url}) the initial updates there), \
or [turn this feature off]({organization_settings_url}) altogether.
these updates (and [move]({move_content_another_stream_help_url}) any updates sent before the \
configuration change), or [turn this feature off]({organization_settings_url}) altogether.
""".format(
zulip_update_announcements_help_url="/help/configure-automated-notices#zulip-update-announcements",
zulip_update_announcements_stream=realm.zulip_update_announcements_stream.name,

View File

@ -147,7 +147,7 @@ class ZulipUpdateAnnouncementsTest(ZulipTestCase):
)
self.assertEqual(realm.zulip_update_announcements_level, 0)
self.assertIn(
"Users in your organization will now receive "
"Starting tomorrow, users in your organization will receive "
"[updates](/help/configure-automated-notices#zulip-update-announcements) about new Zulip features in "
f"#**{realm.zulip_update_announcements_stream}>{realm.ZULIP_UPDATE_ANNOUNCEMENTS_TOPIC_NAME}**",
group_direct_message.content,