From 3bf04ffab59cab017df6ef26e23398a738a8731f Mon Sep 17 00:00:00 2001 From: shashank-23002 <21bec103@iiitdmj.ac.in> Date: Tue, 6 Feb 2024 08:26:58 +0000 Subject: [PATCH] messages: Update new user signup notification. Fixes: #28834. --- zerver/actions/create_user.py | 2 +- zerver/tests/test_events.py | 4 ++-- zerver/tests/test_invite.py | 2 +- zerver/tests/test_new_users.py | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/zerver/actions/create_user.py b/zerver/actions/create_user.py index af7dc0b211..bdbe09de85 100644 --- a/zerver/actions/create_user.py +++ b/zerver/actions/create_user.py @@ -106,7 +106,7 @@ def notify_new_user(user_profile: UserProfile) -> None: is_first_user = user_count == 1 if not is_first_user: with override_language(user_profile.realm.default_language): - message = _("{user} just signed up for Zulip. (total: {user_count})").format( + message = _("{user} joined this organization.").format( user=silent_mention_syntax_for_user(user_profile), user_count=user_count ) diff --git a/zerver/tests/test_events.py b/zerver/tests/test_events.py index 6c8e5a7039..0a29b29e26 100644 --- a/zerver/tests/test_events.py +++ b/zerver/tests/test_events.py @@ -1583,7 +1583,7 @@ class NormalActionsTest(BaseAction): check_message("events[0]", events[0]) self.assertIn( - f'data-user-id="{new_user_profile.id}">test1_zulip.com just signed up for Zulip', + f'data-user-id="{new_user_profile.id}">test1_zulip.com joined this organization.', events[0]["message"]["content"], ) @@ -1609,7 +1609,7 @@ class NormalActionsTest(BaseAction): check_message("events[0]", events[0]) self.assertIn( - f'data-user-id="{new_user_profile.id}">test1_zulip.com just signed up for Zulip', + f'data-user-id="{new_user_profile.id}">test1_zulip.com joined this organization', events[0]["message"]["content"], ) diff --git a/zerver/tests/test_invite.py b/zerver/tests/test_invite.py index 2588ea7c83..761ad295cf 100644 --- a/zerver/tests/test_invite.py +++ b/zerver/tests/test_invite.py @@ -962,7 +962,7 @@ class InviteUserTest(InviteUserBase): self.assertEqual(signups_stream_msg.sender.email, "notification-bot@zulip.com") self.assertTrue( signups_stream_msg.content.startswith( - f"@_**alice_zulip.com|{invitee_profile.id}** just signed up", + f"@_**alice_zulip.com|{invitee_profile.id}** joined this organization", ) ) diff --git a/zerver/tests/test_new_users.py b/zerver/tests/test_new_users.py index 14e90cf88e..4d371eaa83 100644 --- a/zerver/tests/test_new_users.py +++ b/zerver/tests/test_new_users.py @@ -286,7 +286,7 @@ class TestNotifyNewUser(ZulipTestCase): actual_stream = Stream.objects.get(id=message.recipient.type_id) self.assertEqual(actual_stream.name, Realm.INITIAL_PRIVATE_STREAM_NAME) self.assertIn( - f"@_**Cordelia, Lear's daughter|{new_user.id}** just signed up for Zulip.", + f"@_**Cordelia, Lear's daughter|{new_user.id}** joined this organization.", message.content, ) @@ -323,7 +323,7 @@ class TestNotifyNewUser(ZulipTestCase): actual_stream = Stream.objects.get(id=message.recipient.type_id) self.assertEqual(actual_stream, realm.signup_notifications_stream) self.assertIn( - f"@_**new user {user_no}|{new_user.id}** just signed up for Zulip.", + f"@_**new user {user_no}|{new_user.id}** joined this organization.", message.content, ) for string_present in strings_present: