From be3f3f6cfce847bd5990e8ef6f56bcc85e3a283a Mon Sep 17 00:00:00 2001 From: Tollef Fog Heen Date: Mon, 21 Dec 2015 22:20:38 +0100 Subject: Use <@123ABC> rather than <@123ABC|foo> for outgoing nicks The web client doesn't handle nicks on the form <@123ABC|foo.bar> correctly, they're just treated as text. <@123ABC> is handled correctly. Fixes: #119 --- wee_slack.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'wee_slack.py') diff --git a/wee_slack.py b/wee_slack.py index 4c24af4..c8ccf5b 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -508,7 +508,7 @@ class Channel(object): if named[0] in ["group", "channel", "here"]: 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[0], named[1]) + message[item[0]] = "<@{}>{}".format(self.server.users.find(named[0]).identifier, 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]): -- cgit