diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2020-02-19 22:09:15 +0100 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2020-02-20 22:59:04 +0100 |
commit | c0035aa9766e4b20ac597a146cea8b0c69dbedb1 (patch) | |
tree | 56b9346cce71e5bdbe770af34952499dde806374 /wee_slack.py | |
parent | 5b40e22b1a6d8cd44f72195d3a15338e72fe2ec7 (diff) | |
download | wee-slack-c0035aa9766e4b20ac597a146cea8b0c69dbedb1.tar.gz |
Support unfurling date refs by using the fallback
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 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) |