diff options
author | Ryan Huber <rhuber@gmail.com> | 2017-03-27 19:17:16 +0000 |
---|---|---|
committer | Ryan Huber <rhuber@gmail.com> | 2017-03-27 19:17:16 +0000 |
commit | 93cf1fb9ca4e2ceaedb35605ed6686e032fbcf03 (patch) | |
tree | c447fb6f97b453e66fde857bbeaf4900bcf5bb87 | |
parent | eac914db38774444718923f3fe8a8d8b2fc758bf (diff) | |
download | wee-slack-93cf1fb9ca4e2ceaedb35605ed6686e032fbcf03.tar.gz |
fix here/group/channel
-rw-r--r-- | wee_slack.py | 12 |
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: |