From 11d10577ea2f15d9940b37a1b36e11ee2a547bfa Mon Sep 17 00:00:00 2001 From: Trygve Aaberge Date: Mon, 25 Sep 2023 20:40:00 +0200 Subject: Add an option for what to replace space in nicks with --- slack/slack_user.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'slack/slack_user.py') diff --git a/slack/slack_user.py b/slack/slack_user.py index 98d6170..6c9d169 100644 --- a/slack/slack_user.py +++ b/slack/slack_user.py @@ -32,11 +32,13 @@ def _name_from_user_info(workspace: SlackWorkspace, info: SlackUserInfo) -> str: def name_from_user_info_without_spaces( workspace: SlackWorkspace, info: SlackUserInfo ) -> str: - return _name_from_user_info(workspace, info).replace(" ", "") + return _name_from_user_info(workspace, info).replace( + " ", shared.config.look.replace_space_in_nicks_with.value + ) def format_bot_nick(nick: str, colorize: bool = False, only_nick: bool = False) -> str: - nick = nick.replace(" ", "") + nick = nick.replace(" ", shared.config.look.replace_space_in_nicks_with.value) if colorize: nick = with_color(nick_color(nick), nick) -- cgit