aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
authorRyan Huber <rhuber@gmail.com>2017-04-13 09:26:25 -0700
committerGitHub <noreply@github.com>2017-04-13 09:26:25 -0700
commit843de1a69d12f8811dd988ac6f6990e71917a4af (patch)
tree4f195a4d3eff6d6f74c68aeb3cbdf34452f7060d /wee_slack.py
parentcc31591cdfa8b867ef4f42990b7191423ebccba6 (diff)
parent19a16c2cd398149fc3314d131fc0429071cb18e6 (diff)
downloadwee-slack-843de1a69d12f8811dd988ac6f6990e71917a4af.tar.gz
Merge pull request #342 from wee-slack/show_channels_with_hash_symbol_properly
do it for channels but not users, hence new elif
Diffstat (limited to 'wee_slack.py')
-rw-r--r--wee_slack.py4
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)