diff options
author | Ryan Huber <rhuber@gmail.com> | 2017-04-13 16:24:05 +0000 |
---|---|---|
committer | Ryan Huber <rhuber@gmail.com> | 2017-04-13 16:24:05 +0000 |
commit | 19a16c2cd398149fc3314d131fc0429071cb18e6 (patch) | |
tree | 4f195a4d3eff6d6f74c68aeb3cbdf34452f7060d /wee_slack.py | |
parent | cc31591cdfa8b867ef4f42990b7191423ebccba6 (diff) | |
download | wee-slack-19a16c2cd398149fc3314d131fc0429071cb18e6.tar.gz |
do it for channels but not users, hence new elif
Diffstat (limited to 'wee_slack.py')
-rw-r--r-- | wee_slack.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/wee_slack.py b/wee_slack.py index 10e4882..d5acd59 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -2303,7 +2303,9 @@ def unfurl_ref(ref, ignore_alt_text=False): if ignore_alt_text: display_text = resolve_ref(id) else: - if id.startswith("#C") or id.startswith("@U"): + if id.startswith("#C"): + display_text = "#{}".format(ref.split('|')[1]) + elif id.startswith("@U"): display_text = ref.split('|')[1] else: url, desc = ref.split('|', 1) |