4
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2025-06-27 11:09:24 +00:00

Update vendor (slack)

This commit is contained in:
Wim
2016-11-06 00:07:24 +01:00
parent 2dbe0eb557
commit 37873acfcd
9 changed files with 220 additions and 23 deletions

View File

@ -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"`
}