mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	integrations: Change Slack private channel mention string.
In Slack webhook integration setup, the only scenario where a message payload contains a channel mention without the channels name is when the user mentions a private channel. e.g <#C07AVLQ3AUQ|> This commit updates the string we use for such mention to "private Slack channel" for better clarity.
This commit is contained in:
		@@ -79,7 +79,9 @@ def convert_slack_user_and_channel_mentions(text: str, app_token: str) -> str:
 | 
			
		||||
            # a mention isn't triggered for a Zulip channel with the same name.
 | 
			
		||||
            channel_info: list[str] = slack_channelmention_match.group(0).split("|")
 | 
			
		||||
            channel_name = channel_info[1]
 | 
			
		||||
            tokens[iterator] = f"**#{channel_name}**" if channel_name else "**#[private channel]**"
 | 
			
		||||
            tokens[iterator] = (
 | 
			
		||||
                f"**#{channel_name}**" if channel_name else "**#[private Slack channel]**"
 | 
			
		||||
            )
 | 
			
		||||
    text = " ".join(tokens)
 | 
			
		||||
    return text
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user