aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
Diffstat (limited to 'wee_slack.py')
-rw-r--r--wee_slack.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/wee_slack.py b/wee_slack.py
index aa19a01..01aa5a2 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -1675,11 +1675,15 @@ class SlackMPDMChannel(SlackChannel):
self.eventrouter.receive(s)
# self.create_buffer()
+ @staticmethod
+ def adjust_name(n):
+ return "|".join("-".join(n.split("-")[1:-1]).split("--"))
+
def set_name(self, n):
- self.name = "|".join("-".join(n.split("-")[1:-1]).split("--"))
+ self.name = self.adjust_name(n)
def formatted_name(self, style="default", typing=False, **kwargs):
- adjusted_name = "|".join("-".join(self.slack_name.split("-")[1:-1]).split("--"))
+ adjusted_name = self.adjust_name(self.slack_name)
if config.channel_name_typing_indicator:
if not typing:
prepend = "#"