Skip to content

Commit

Permalink
Merge PR #274 moved message to 'text' instead of
Browse files Browse the repository at this point in the history
'fields' to resolve truncated message issue.
  • Loading branch information
samrocketman committed Mar 2, 2017
2 parents 483add3 + 48ed161 commit 3905e00
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/main/java/jenkins/plugins/slack/StandardSlackService.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,11 @@ public boolean publish(String message, String color) {
boolean result = true;
for (String roomId : roomIds) {
//prepare attachments first
JSONObject field = new JSONObject();
field.put("short", false);
field.put("value", message);

JSONArray fields = new JSONArray();
fields.put(field);

JSONObject attachment = new JSONObject();
attachment.put("text", message);
attachment.put("fallback", message);
attachment.put("color", color);
attachment.put("fields", fields);

JSONArray mrkdwn = new JSONArray();
mrkdwn.put("pretext");
mrkdwn.put("text");
Expand Down

0 comments on commit 3905e00

Please sign in to comment.