aboutsummaryrefslogtreecommitdiffstats
path: root/slack/slack_user.py
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2023-09-25 20:40:00 +0200
committerTrygve Aaberge <trygveaa@gmail.com>2024-02-18 11:32:54 +0100
commit11d10577ea2f15d9940b37a1b36e11ee2a547bfa (patch)
tree2701855b7267cba07fa8e3bff07cfc38f4582918 /slack/slack_user.py
parent718931401d942e6439452ca6dbb9b4de5a1ff0f2 (diff)
downloadwee-slack-11d10577ea2f15d9940b37a1b36e11ee2a547bfa.tar.gz
Add an option for what to replace space in nicks with
Diffstat (limited to 'slack/slack_user.py')
-rw-r--r--slack/slack_user.py6
1 files changed, 4 insertions, 2 deletions
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)