slack-go / slack

Slack API in Go, originally by @nlopes; Maintainers needed, contact @parsley42
https://pkg.go.dev/github.com/slack-go/slack
BSD 2-Clause "Simplified" License
4.7k stars 1.14k forks source link

Add event_ts field on all "inner events" #1051

Open abustany opened 2 years ago

abustany commented 2 years ago

Description

Currently (as of 93035c946040f00b2eb69dc9a954f83a9803e931) the EventTimestamp field is only present on some inner events types. According to the OpenAPI specs, the event_ts field should be present along with type on all inner events.

(Optional) Slack's documentation

https://github.com/slackapi/slack-api-specs/blob/master/events-api/slack_events_api_async_v1.json#L30

The web docs don't mention that event_ts should be present, but I can verify that it actually is.

kanata2 commented 2 years ago

The slack-api-specs repository is not maintained precisely as far as I can see. So if you want to know the latest specifications, you can look at the official SDKs for Node.js and Java.

abustany commented 2 years ago

ah good thanks for the pointer to the Java SDK. I updated https://github.com/slack-go/slack/pull/1052 to not add event_ts on the grid migration events, since those don't seem to have that field according to the Java SDK.

I wonder if one could hack a quick&dirty parser to generate the Go models from the Java ones :shrug: