mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 13:03:29 +00:00
streams: Change text in notification bot DM.
This commit addresses the second bullet in zulip#31206 (comment).
This commit is contained in:
@@ -7873,7 +7873,7 @@ class GetSubscribersTest(ZulipTestCase):
|
||||
+ f"""<li><a class="stream" data-stream-id="{stream.id}" href="/#narrow/channel/{stream.id}-{stream.name}">#{stream.name}</a></li>\n"""
|
||||
)
|
||||
msg = f"""
|
||||
<p><span class="user-mention" data-user-id="{hamlet.id}">@King Hamlet</span> subscribed you to the following channels:</p>
|
||||
<p><span class="user-mention silent" data-user-id="{hamlet.id}">King Hamlet</span> subscribed you to the following channels:</p>
|
||||
<ul>
|
||||
{rendered_stream_list}
|
||||
</ul>
|
||||
@@ -7901,7 +7901,7 @@ class GetSubscribersTest(ZulipTestCase):
|
||||
|
||||
stream_invite_only_1 = get_stream("stream_invite_only_1", realm)
|
||||
msg = f"""
|
||||
<p><span class="user-mention" data-user-id="{hamlet.id}">@King Hamlet</span> subscribed you to the channel <a class="stream" data-stream-id="{stream_invite_only_1.id}" href="/#narrow/channel/{stream_invite_only_1.id}-{stream_invite_only_1.name}">#{stream_invite_only_1.name}</a>.</p>
|
||||
<p><span class="user-mention silent" data-user-id="{hamlet.id}">King Hamlet</span> subscribed you to <a class="stream" data-stream-id="{stream_invite_only_1.id}" href="/#narrow/channel/{stream_invite_only_1.id}-{stream_invite_only_1.name}">#{stream_invite_only_1.name}</a>.</p>
|
||||
"""
|
||||
for user in [cordelia, othello, polonius]:
|
||||
self.assert_user_got_subscription_notification(user, msg)
|
||||
|
||||
@@ -572,14 +572,14 @@ def you_were_just_subscribed_message(
|
||||
subscriptions = sorted(stream_names)
|
||||
if len(subscriptions) == 1:
|
||||
with override_language(recipient_user.default_language):
|
||||
return _("{user_full_name} subscribed you to the channel {channel_name}.").format(
|
||||
user_full_name=f"@**{acting_user.full_name}|{acting_user.id}**",
|
||||
return _("{user_full_name} subscribed you to {channel_name}.").format(
|
||||
user_full_name=silent_mention_syntax_for_user(acting_user),
|
||||
channel_name=f"#**{subscriptions[0]}**",
|
||||
)
|
||||
|
||||
with override_language(recipient_user.default_language):
|
||||
message = _("{user_full_name} subscribed you to the following channels:").format(
|
||||
user_full_name=f"@**{acting_user.full_name}|{acting_user.id}**",
|
||||
user_full_name=silent_mention_syntax_for_user(acting_user),
|
||||
)
|
||||
message += "\n\n"
|
||||
for channel_name in subscriptions:
|
||||
|
||||
Reference in New Issue
Block a user