diff options
Diffstat (limited to 'vendor/github.com/nlopes/slack/attachments.go')
-rw-r--r-- | vendor/github.com/nlopes/slack/attachments.go | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/vendor/github.com/nlopes/slack/attachments.go b/vendor/github.com/nlopes/slack/attachments.go index 4faf3e3f..f7b81617 100644 --- a/vendor/github.com/nlopes/slack/attachments.go +++ b/vendor/github.com/nlopes/slack/attachments.go @@ -1,5 +1,7 @@ package slack +import "encoding/json" + // AttachmentField contains information for an attachment field // An Attachment can contain multiple of these type AttachmentField struct { @@ -12,12 +14,12 @@ type AttachmentField struct { // using message buttons and otherwise not useful. A maximum of 5 actions may be // provided per attachment. type AttachmentAction struct { - Name string `json:"name"` // Required. - Text string `json:"text"` // Required. - Style string `json:"style,omitempty"` // Optional. Allowed values: "default", "primary", "danger" - Type string `json:"type"` // Required. Must be set to "button" - Value string `json:"value,omitempty"` // Optional. - Confirm []ConfirmationField `json:"confirm,omitempty"` // Optional. + Name string `json:"name"` // Required. + Text string `json:"text"` // Required. + Style string `json:"style,omitempty"` // Optional. Allowed values: "default", "primary", "danger" + Type string `json:"type"` // Required. Must be set to "button" + Value string `json:"value,omitempty"` // Optional. + Confirm *ConfirmationField `json:"confirm,omitempty"` // Optional. } // AttachmentActionCallback is sent from Slack when a user clicks a button in an interactive message (aka AttachmentAction) @@ -72,5 +74,5 @@ type Attachment struct { Footer string `json:"footer,omitempty"` FooterIcon string `json:"footer_icon,omitempty"` - Ts int64 `json:"ts,omitempty"` + Ts json.Number `json:"ts,omitempty"` } |