Skip to content

Commit

Permalink
Custom message should handle all results by default
Browse files Browse the repository at this point in the history
  • Loading branch information
KreAch3R committed Dec 17, 2018
1 parent 8cde8f5 commit f3f0bdd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/jenkins/plugins/slack/ActiveNotifier.java
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ public MessageBuilder appendFailedTests() {
}

public MessageBuilder appendCustomMessage(Result buildResult) {
String customMessage = notifier.getCustomMessage();
String customMessage = "";
if (buildResult != null) {
if (buildResult == Result.SUCCESS) {
customMessage = notifier.getCustomMessageSuccess();
Expand All @@ -458,6 +458,9 @@ public MessageBuilder appendCustomMessage(Result buildResult) {
customMessage = notifier.getCustomMessageFailure();
}
}
if (customMessage.isEmpty()) {
customMessage = notifier.getCustomMessage();
}
try {
String replaced = TokenMacro.expandAll(build, new LogTaskListener(logger, INFO), customMessage, false, null);
message.append("\n");
Expand Down

0 comments on commit f3f0bdd

Please sign in to comment.