Skip to content

Commit

Permalink
Should've read the Slack docs about channel mentions by bots
Browse files Browse the repository at this point in the history
  • Loading branch information
neilprosser committed Mar 6, 2015
1 parent e890334 commit 2723221
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public String apply(Alert input) {
}
}));

String channel = subscription.getTarget().contains("!") ? "@channel" : "";
String channel = subscription.getTarget().contains("!") ? "<!channel>" : "";

final String state = check.getState().toString();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public void basicSlackTest() {

assertThat(content, Matchers.containsString("token="));
assertThat(content, Matchers.containsString("&channel=target"));
assertThat(content, not(Matchers.containsString(encode("@channel"))));
assertThat(content, not(Matchers.containsString(encode("<!channel>"))));
assertThat(content, Matchers.containsString(encode("ERROR test-check")));
assertThat(content, Matchers.containsString(encode("/#/checks/123")));
assertThat(content, Matchers.containsString("&username=Seyren"));
Expand Down Expand Up @@ -161,7 +161,7 @@ public void mentionChannelWhenTargetContainsExclamationTest() {

assertThat(content, Matchers.containsString("token="));
assertThat(content, Matchers.containsString("&channel=target"));
assertThat(content, Matchers.containsString(encode("@channel")));
assertThat(content, Matchers.containsString(encode("<!channel>")));
assertThat(content, Matchers.containsString(encode("ERROR test-check")));
assertThat(content, Matchers.containsString(encode("/#/checks/123")));
assertThat(content, Matchers.containsString("&username=Seyren"));
Expand Down

0 comments on commit 2723221

Please sign in to comment.