diff options
author | Romain THERRAT <romain42@gmail.com> | 2022-09-19 09:47:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-19 09:47:42 +0200 |
commit | 5b059ade4951021d054822fe04508d7d1e1473e8 (patch) | |
tree | 117589eeefdaae2b76bd489d27ffc02ed8431eaa /wee_slack.py | |
parent | aa1e62619af99181e97ad1201c35e838d53e06df (diff) | |
download | wee-slack-5b059ade4951021d054822fe04508d7d1e1473e8.tar.gz |
feat(display): Add URL when slack block contain URL (#863)
When slack return a button message type and a url field is present we
should output the URL.
Fix: #811 and #810
Diffstat (limited to 'wee_slack.py')
-rw-r--r-- | wee_slack.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/wee_slack.py b/wee_slack.py index 2c7adfd..df9966c 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -4555,6 +4555,8 @@ def unfurl_blocks(blocks): for element in block["elements"]: if element["type"] == "button": elements.append(unfurl_block_element(element["text"])) + if "url" in element: + elements.append(element["url"]) else: elements.append( colorize_string( |