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

feat(slackevents): Support metadata in MessageEvent #1307

Merged
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
2 changes: 2 additions & 0 deletions slackevents/inner_events.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,8 @@ type MessageEvent struct {
Blocks slack.Blocks `json:"blocks,omitempty"`
Attachments []slack.Attachment `json:"attachments,omitempty"`

Metadata slack.SlackMetadata `json:"metadata,omitempty"`

// Root is the message that was broadcast to the channel when the SubType is
// thread_broadcast. If this is not a thread_broadcast message event, this
// value is nil.
Expand Down
6 changes: 6 additions & 0 deletions slackevents/inner_events_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,12 @@ func TestMessageEvent(t *testing.T) {
"ts": "1355517524.000000"
}
},
"metadata": {
"event_type": "example",
"event_payload": {
"key": "value"
}
},
"previous_message": {
"text": "Live long and prospect."
}
Expand Down
Loading