aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--wee_slack.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/wee_slack.py b/wee_slack.py
index 0157306..a2f472a 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -2253,12 +2253,14 @@ def linkify_text(message, team, channel):
#print targets.groups()
named = targets.groups()
if named[1] in ["group", "channel", "here"]:
+ dbg(named[1], 5)
message[item[0]] = "<!{}>".format(named[1])
- try:
- if usernames[named[1]]:
- message[item[0]] = "<@{}>{}".format(usernames[named[1]], named[2])
- except:
- message[item[0]] = "@{}{}".format(named[1], named[2])
+ else:
+ try:
+ if usernames[named[1]]:
+ message[item[0]] = "<@{}>{}".format(usernames[named[1]], named[2])
+ except:
+ message[item[0]] = "@{}{}".format(named[1], named[2])
if targets and targets.groups()[0] == '#':
named = targets.groups()
try: