aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
authorRyan Huber <rhuber@gmail.com>2015-07-23 08:24:12 -0700
committerRyan Huber <rhuber@gmail.com>2015-07-23 08:24:12 -0700
commit28e4a194ee9200406f430e606d5d8dc65b01ebcf (patch)
tree10c7873dc27063a8a560ea07448daaed6de36d3c /wee_slack.py
parentd6780a6db3e19e611cd94ee43474382ed3bfc8d0 (diff)
downloadwee-slack-28e4a194ee9200406f430e606d5d8dc65b01ebcf.tar.gz
fix linkify to include original name
Diffstat (limited to 'wee_slack.py')
-rw-r--r--wee_slack.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/wee_slack.py b/wee_slack.py
index 8416ee3..979f7d6 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -444,11 +444,11 @@ class Channel(object):
if named[0] in ["group", "channel"]:
message[item[0]] = "<!{}>".format(named[0])
if self.server.users.find(named[0]):
- message[item[0]] = "<@{}>{}".format(self.server.users.find(named[0]).identifier, named[1])
+ message[item[0]] = "<@{}|{}>{}".format(self.server.users.find(named[0]).identifier, named[0], named[1])
if item[1].startswith('#') and self.server.channels.find(item[1]):
named = re.match('.*[@#](\w+)(\W*)', item[1]).groups()
if self.server.channels.find(named[0]):
- message[item[0]] = "<#{}>{}".format(self.server.channels.find(named[0]).identifier, named[1])
+ message[item[0]] = "<#{}|{}>{}".format(self.server.channels.find(named[0]).identifier, named[0], named[1])
dbg(message)
return " ".join(message)