Skip to content

Commit

Permalink
Merge pull request #96 from aspic/fix/parse-ts-json-string-to-int
Browse files Browse the repository at this point in the history
Tells JSON interpreter that TS is a string encoded int64
  • Loading branch information
nlopes committed Sep 8, 2016
2 parents b7940f2 + e345196 commit a8ceb9d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion attachments.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,5 @@ type Attachment struct {
Footer string `json:"footer,omitempty"`
FooterIcon string `json:"footer_icon,omitempty"`

Ts int64 `json:"ts,omitempty"`
Ts int64 `json:"ts,omitempty,string"`
}

1 comment on commit a8ceb9d

@tobert
Copy link
Contributor

@tobert tobert commented on a8ceb9d Sep 13, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can Ts be a string like the other timestamps in the API? It seems to be intentionally sent as a string rather than a JSON number (float). Forcing it into int64 is going to truncate the timestamps received from Slack and make it impossible to send floats (probably not a big deal though). Consistency seems like the way to go.

Please sign in to comment.