Skip to content

Commit 0e44f52

Browse files
Merge pull request #6 from MatWisz/master
Add missing Slack Attachment fields
2 parents 5b6b71a + 0bc232c commit 0e44f52

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

src/main/java/in/ashwanthkumar/slack/webhook/SlackAttachment.java

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@ public class SlackAttachment {
2929
private String text;
3030
@SerializedName("image_url")
3131
private String imageUrl;
32+
@SerializedName("thumb_url")
33+
private String thumbUrl;
34+
@SerializedName("footer")
35+
private String footer;
36+
@SerializedName("footer_icon")
37+
private String footerIcon;
38+
@SerializedName("ts")
39+
private int timestamp;
3240
@SerializedName("fields")
3341
private List<Field> fields = new ArrayList<Field>();
3442
@SerializedName("mrkdwn_in")
@@ -119,6 +127,26 @@ public SlackAttachment text(SlackMessage message) {
119127
return text(message.toString());
120128
}
121129

130+
public SlackAttachment thumbUrl(String thumbUrl) {
131+
this.thumbUrl = thumbUrl;
132+
return this;
133+
}
134+
135+
public SlackAttachment footer(String footer) {
136+
this.footer = footer;
137+
return this;
138+
}
139+
140+
public SlackAttachment footerIcon(String footerIcon) {
141+
this.footerIcon = footerIcon;
142+
return this;
143+
}
144+
145+
public SlackAttachment timestamp(int timestamp) {
146+
this.timestamp = timestamp;
147+
return this;
148+
}
149+
122150
public SlackAttachment addField(Field field) {
123151
this.fields.add(field);
124152
return this;

0 commit comments

Comments
 (0)