Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

attachements "ts" is a string #232

Merged
merged 2 commits into from
Jan 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class SlackAttachment {
private String image_url;

private String color;
private Long timestamp;
private String timestamp;

private Map<String, String> miscRootFields;

Expand Down Expand Up @@ -122,7 +122,7 @@ public void setColor(String color)

public void setFooterIcon(String footer_icon) { this.footer_icon = footer_icon; }

public void setTimestamp(Long timestamp) {
public void setTimestamp(String timestamp) {
this.timestamp = timestamp;
}

Expand Down Expand Up @@ -186,7 +186,7 @@ public List<String> getMarkdown_in() {

public String getFooterIcon() { return footer_icon; }

public Long getTimestamp() {
public String getTimestamp() {
return timestamp;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ private static ArrayList<SlackAttachment> extractAttachmentsFromMessageJSON(Json
slackAttachment.setImageUrl(GsonHelper.getStringOrNull(obj.get("image_url")));
slackAttachment.setFooter(GsonHelper.getStringOrNull(obj.get("footer")));
slackAttachment.setFooterIcon(GsonHelper.getStringOrNull(obj.get("footer_icon")));
slackAttachment.setTimestamp(GsonHelper.getLongOrNull(obj.get("ts")));
slackAttachment.setTimestamp(GsonHelper.getStringOrNull(obj.get("ts")));

if(obj.get("fields") != null) {
for (JsonElement fieldElement : obj.get("fields").getAsJsonArray()) {
Expand Down