mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	streams: Improve formatting of channel archive/unarchive notifications.
This commit updates the formatting of the channel archive and unarchive notifications to make the channel name bold and clickable. The channel name is now displayed as a Markdown link with bold formatting, ensuring it stands out while remaining a clickable link to the channel.
This commit is contained in:
		
				
					committed by
					
						
						Tim Abbott
					
				
			
			
				
	
			
			
			
						parent
						
							2780360b00
						
					
				
				
					commit
					5c33cc9eab
				
			@@ -188,7 +188,9 @@ def do_deactivate_stream(stream: Stream, *, acting_user: UserProfile | None) ->
 | 
			
		||||
            sender,
 | 
			
		||||
            stream,
 | 
			
		||||
            topic_name=str(Realm.STREAM_EVENTS_NOTIFICATION_TOPIC_NAME),
 | 
			
		||||
            content=_("Channel {channel_name} has been archived.").format(channel_name=stream.name),
 | 
			
		||||
            content=_("Channel #**{channel_name}** has been archived.").format(
 | 
			
		||||
                channel_name=stream.name
 | 
			
		||||
            ),
 | 
			
		||||
            archived_channel_notice=True,
 | 
			
		||||
            limit_unread_user_ids=set(),
 | 
			
		||||
        )
 | 
			
		||||
@@ -310,7 +312,7 @@ def do_unarchive_stream(stream: Stream, new_name: str, *, acting_user: UserProfi
 | 
			
		||||
            sender,
 | 
			
		||||
            stream,
 | 
			
		||||
            str(Realm.STREAM_EVENTS_NOTIFICATION_TOPIC_NAME),
 | 
			
		||||
            _("Channel {channel_name} un-archived.").format(channel_name=new_name),
 | 
			
		||||
            _("Channel #**{channel_name}** has been unarchived.").format(channel_name=new_name),
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -2012,7 +2012,7 @@ class StreamAdminTest(ZulipTestCase):
 | 
			
		||||
        self.assertTrue(check_subscriptions_exists(user_profile, stream))
 | 
			
		||||
        # Assert that a notification message was sent for the archive.
 | 
			
		||||
        message = self.get_last_message()
 | 
			
		||||
        expected_content = f"Channel {stream.name} has been archived."
 | 
			
		||||
        expected_content = f"Channel #**{stream.name}** has been archived."
 | 
			
		||||
        self.assertEqual(message.content, expected_content)
 | 
			
		||||
 | 
			
		||||
        # Assert that the message is read.
 | 
			
		||||
@@ -2042,7 +2042,7 @@ class StreamAdminTest(ZulipTestCase):
 | 
			
		||||
        self.assertTrue(check_subscriptions_exists(user_profile, stream))
 | 
			
		||||
        # Assert that a notification message was sent for the archive.
 | 
			
		||||
        message = self.get_last_message()
 | 
			
		||||
        expected_content = f"Channel {stream.name} has been archived."
 | 
			
		||||
        expected_content = f"Channel #**{stream.name}** has been archived."
 | 
			
		||||
        self.assertEqual(message.content, expected_content)
 | 
			
		||||
 | 
			
		||||
        # Assert that the message is read.
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user