Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
streams: Change text in notification bot DM.
Kislay Verma54be18d430f2
diff --git a/zerver/tests/test_subs.py b/zerver/tests/test_subs.pyindex e8fc398f4af..cc0f5849200 100644--- a/zerver/tests/test_subs.py+++ b/zerver/tests/test_subs.py@@ -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)diff --git a/zerver/views/streams.py b/zerver/views/streams.pyindex c8d8fcca563..f45ad1ddea4 100644--- a/zerver/views/streams.py+++ b/zerver/views/streams.py@@ -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: