diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2023-01-29 05:00:11 +0100 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2024-02-18 11:32:53 +0100 |
commit | f5dab24587beee2f2d4d4310adb64dad820787ad (patch) | |
tree | 0dee2f65a07d3bc4727ff0a3fe736cd7f0fc4899 /slack | |
parent | 7558ceddd3f5bd12206a68005c063ab4866e8332 (diff) | |
download | wee-slack-f5dab24587beee2f2d4d4310adb64dad820787ad.tar.gz |
Support unfurling special mentions (@here/@channel/@everyone)
Diffstat (limited to 'slack')
-rw-r--r-- | slack/slack_message.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/slack/slack_message.py b/slack/slack_message.py index 3c33864..f79cdc2 100644 --- a/slack/slack_message.py +++ b/slack/slack_message.py @@ -81,6 +81,11 @@ class SlackMessage: def unfurl_ref(match: Match[str]): item = items[match["id"]] + if match["id"] in ["!here", "!channel", "!everyone"]: + return with_color( + shared.config.color.usergroup_mention_color.value, + "@" + removeprefix(match["id"], "!"), + ) if isinstance(item, slack.slack_conversation.SlackConversation): return with_color( shared.config.color.channel_mention_color.value, "#" + item.name |