aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2023-10-21 21:58:38 +0200
committerTrygve Aaberge <trygveaa@gmail.com>2024-02-18 11:32:54 +0100
commitf2b37aaee3ac5815e9398dca530cf3c832b78a28 (patch)
treeb3d3b0c9c81b0650fba3568c89e97062070254ca
parentce7126e9efecb63055283a2c5b6fe474f423f3ed (diff)
downloadwee-slack-f2b37aaee3ac5815e9398dca530cf3c832b78a28.tar.gz
Support group broadcast refs
This is an alias for @channel.
-rw-r--r--slack/slack_message.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/slack/slack_message.py b/slack/slack_message.py
index 2ac30e4..6d5b39e 100644
--- a/slack/slack_message.py
+++ b/slack/slack_message.py
@@ -258,7 +258,8 @@ class PendingMessageItem:
return with_color(shared.config.color.usergroup_mention.value, name)
elif self.item_type == "broadcast":
- name = f"@{self.item_id}"
+ broadcast_name = self.item_id.replace("group", "channel")
+ name = f"@{broadcast_name}"
return with_color(shared.config.color.usergroup_mention.value, name)
elif self.item_type == "message_nick":
@@ -752,7 +753,7 @@ class SlackMessage:
"mention",
fallback_name,
)
- elif item_id in ["!here", "!channel", "!everyone"]:
+ elif item_id in ["!channel", "!everyone", "!group", "!here"]:
return PendingMessageItem(
self, "broadcast", removeprefix(item_id, "!"), "mention", fallback_name
)