diff options
-rw-r--r-- | _pytest/test_linkifytext.py | 5 | ||||
-rw-r--r-- | wee_slack.py | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/_pytest/test_linkifytext.py b/_pytest/test_linkifytext.py index a086fde..7c67fa6 100644 --- a/_pytest/test_linkifytext.py +++ b/_pytest/test_linkifytext.py @@ -49,6 +49,11 @@ def test_linkifytext_at_channel(team): assert text == '<!channel>: my test message' +def test_linkifytext_at_everyone(team): + text = linkify_text('@everyone: my test message', team) + + assert text == '<!everyone>: my test message' + def test_linkifytext_at_group(team): text = linkify_text('@group: my test message', team) diff --git a/wee_slack.py b/wee_slack.py index 366bde6..c105a98 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -3203,7 +3203,7 @@ def linkify_text(message, team): targets = re.match(r'^\s*([@#])([\w\(\)\'.-]+)(\W*)', item[1], re.UNICODE) if targets and targets.groups()[0] == '@': named = targets.groups() - if named[1] in ["group", "channel", "here"]: + if named[1] in ["channel", "everyone", "group", "here"]: message[item[0]] = "<!{}>{}".format(named[1], named[2]) elif named[0] + named[1] in usergroups.keys(): message[item[0]] = "<!subteam^{}|@{}>{}".format(usergroups[named[0] + named[1]], named[1], named[2]) |