aboutsummaryrefslogtreecommitdiffstats
path: root/slack/slack_message.py
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2024-02-21 19:10:11 +0100
committerTrygve Aaberge <trygveaa@gmail.com>2024-02-21 19:10:11 +0100
commitf931870f46ce0af8739ab1439269eabc8dcc2cb4 (patch)
tree9aa9bacd71011693d0d845a1f93b99ac9977c53e /slack/slack_message.py
parent3f2dd0e60cde8396a4b09f2e5668674f16a40703 (diff)
downloadwee-slack-f931870f46ce0af8739ab1439269eabc8dcc2cb4.tar.gz
Support date in rich text elements
Diffstat (limited to 'slack/slack_message.py')
-rw-r--r--slack/slack_message.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/slack/slack_message.py b/slack/slack_message.py
index fc50c58..c16f6f0 100644
--- a/slack/slack_message.py
+++ b/slack/slack_message.py
@@ -1111,6 +1111,8 @@ class SlackMessage:
rgb_int = int(element["value"].lstrip("#"), 16)
weechat_color = weechat.info_get("color_rgb2term", str(rgb_int))
return f"{element['value']} {with_color(weechat_color, '■')}"
+ elif element["type"] == "date":
+ return format_date(element["timestamp"], element["format"])
elif element["type"] == "channel":
return PendingMessageItem(self, "conversation", element["channel_id"])
elif element["type"] == "user":