diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2023-09-28 01:15:16 +0200 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2024-02-18 11:32:54 +0100 |
commit | 85eb57898a510d6a1d9b3b8b0e0b736b9a598a55 (patch) | |
tree | cc06334686bc8f87eeb0f46be201a21b51b17e2e | |
parent | afb77699997cdba0d3b88acf89cfcd29b34b9e6f (diff) | |
download | wee-slack-85eb57898a510d6a1d9b3b8b0e0b736b9a598a55.tar.gz |
Prefix private conversations with &
-rw-r--r-- | slack/slack_conversation.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/slack/slack_conversation.py b/slack/slack_conversation.py index fe8cd79..d3f7763 100644 --- a/slack/slack_conversation.py +++ b/slack/slack_conversation.py @@ -183,16 +183,18 @@ class SlackConversation(SlackBuffer): self, name_type: Literal["full_name", "short_name", "short_name_without_padding"], ) -> str: - if self._info["is_im"] is True: + if self.type == "im": if name_type == "short_name": return " " else: return "" - elif self._info["is_mpim"]: + elif self.type == "mpim": if name_type == "short_name" or name_type == "short_name_without_padding": return "@" else: return "" + elif self.type == "private": + return "&" else: return "#" |