aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2020-02-19 22:09:15 +0100
committerTrygve Aaberge <trygveaa@gmail.com>2020-02-20 22:59:04 +0100
commitc0035aa9766e4b20ac597a146cea8b0c69dbedb1 (patch)
tree56b9346cce71e5bdbe770af34952499dde806374 /wee_slack.py
parent5b40e22b1a6d8cd44f72195d3a15338e72fe2ec7 (diff)
downloadwee-slack-c0035aa9766e4b20ac597a146cea8b0c69dbedb1.tar.gz
Support unfurling date refs by using the fallback
Diffstat (limited to 'wee_slack.py')
-rw-r--r--wee_slack.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/wee_slack.py b/wee_slack.py
index 0e08ef5..9370740 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -3448,6 +3448,8 @@ def unfurl_refs(text):
elif ref.startswith("!subteam"):
prefix = "@" if not fallback.startswith("@") else ""
return prefix + fallback
+ elif ref.startswith("!date"):
+ return fallback
else:
match_url = r"^\w+:(//)?{}$".format(re.escape(fallback))
url_matches_desc = re.match(match_url, ref)