Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
create_user: Use silent mentions in user join notices.
Sayyed Arib Hussain7e38d0613022
diff --git a/zerver/actions/create_user.py b/zerver/actions/create_user.pyindex b6236319471..8b780950e0e 100644--- a/zerver/actions/create_user.py+++ b/zerver/actions/create_user.py@@ -254,7 +254,7 @@ def process_new_human_user(get_system_bot(settings.NOTIFICATION_BOT, prereg_user.referred_by.realm_id),prereg_user.referred_by,_("{user} accepted your invitation to join Zulip!").format(- user=f"{user_profile.full_name} <`{user_profile.email}`>"+ user=silent_mention_syntax_for_user(user_profile)),)diff --git a/zerver/tests/test_invite.py b/zerver/tests/test_invite.pyindex b36647015dc..af90df6cdfa 100644--- a/zerver/tests/test_invite.py+++ b/zerver/tests/test_invite.py@@ -957,7 +957,7 @@ class InviteUserTest(InviteUserBase):self.assertEqual(inviter_msg.sender.email, "[email protected]")self.assertTrue(inviter_msg.content.startswith(- f"alice_zulip.com <`{invitee_profile.email}`> accepted your",+ f"@_**{invitee_profile.full_name}|{invitee_profile.id}** accepted your",))diff --git a/zerver/tests/test_users.py b/zerver/tests/test_users.pyindex 31adb706442..b6bcc77465c 100644--- a/zerver/tests/test_users.py+++ b/zerver/tests/test_users.py@@ -826,7 +826,7 @@ class QueryCountTest(ZulipTestCase):prereg_user = PreregistrationUser.objects.get(email="[email protected]")- with self.assert_database_query_count(92):+ with self.assert_database_query_count(93):with self.assert_memcached_count(23):with self.capture_send_event_calls(expected_num_events=11) as events:fred = do_create_user(