Skip to content

Commit b40bd98

Browse files
author
Chris Toshok
committed
add a comment for why MessageTimeStamp is a string, not json.Number
1 parent c415915 commit b40bd98

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

slackevents/inner_events.go

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,13 @@ type GridMigrationStartedEvent struct {
161161

162162
// LinkSharedEvent A message was posted containing one or more links relevant to your application
163163
type LinkSharedEvent struct {
164-
Type string `json:"type"`
165-
User string `json:"user"`
166-
TimeStamp string `json:"ts"`
167-
Channel string `json:"channel"`
164+
Type string `json:"type"`
165+
User string `json:"user"`
166+
TimeStamp string `json:"ts"`
167+
Channel string `json:"channel"`
168+
// MessageTimeStamp can be both a numeric timestamp if the LinkSharedEvent corresponds to a sent
169+
// message and (contrary to the field name) a uuid if the LinkSharedEvent is generated in the
170+
// compose text area.
168171
MessageTimeStamp string `json:"message_ts"`
169172
ThreadTimeStamp string `json:"thread_ts"`
170173
Links []sharedLinks `json:"links"`

0 commit comments

Comments
 (0)