mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	create_user: Use silent mentions in user join notices.
This provides more information (email, etc.) when clicked on while being better adapted to email_address_visibility existing. Fixes #27243.
This commit is contained in:
		
				
					committed by
					
						
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							56ccaa571e
						
					
				
				
					commit
					7e38d06130
				
			@@ -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)
 | 
			
		||||
                ),
 | 
			
		||||
            )
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -957,7 +957,7 @@ class InviteUserTest(InviteUserBase):
 | 
			
		||||
        self.assertEqual(inviter_msg.sender.email, "notification-bot@zulip.com")
 | 
			
		||||
        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",
 | 
			
		||||
            )
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -826,7 +826,7 @@ class QueryCountTest(ZulipTestCase):
 | 
			
		||||
 | 
			
		||||
        prereg_user = PreregistrationUser.objects.get(email="fred@zulip.com")
 | 
			
		||||
 | 
			
		||||
        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(
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user