summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/nlopes/slack/attachments.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/nlopes/slack/attachments.go')
-rw-r--r--vendor/github.com/nlopes/slack/attachments.go14
1 files changed, 6 insertions, 8 deletions
diff --git a/vendor/github.com/nlopes/slack/attachments.go b/vendor/github.com/nlopes/slack/attachments.go
index 06f59fa3..cf8b5c67 100644
--- a/vendor/github.com/nlopes/slack/attachments.go
+++ b/vendor/github.com/nlopes/slack/attachments.go
@@ -17,7 +17,7 @@ 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" or "select".
+ Type actionType `json:"type"` // Required. Must be set to "button" or "select".
Value string `json:"value,omitempty"` // Optional.
DataSource string `json:"data_source,omitempty"` // Optional.
MinQueryLength int `json:"min_query_length,omitempty"` // Optional. Default value is 1.
@@ -28,6 +28,11 @@ type AttachmentAction struct {
URL string `json:"url,omitempty"` // Optional.
}
+// actionType returns the type of the action
+func (a AttachmentAction) actionType() actionType {
+ return a.Type
+}
+
// AttachmentActionOption the individual option to appear in action menu.
type AttachmentActionOption struct {
Text string `json:"text"` // Required.
@@ -45,13 +50,6 @@ type AttachmentActionOptionGroup struct {
// DEPRECATED: use InteractionCallback
type AttachmentActionCallback InteractionCallback
-// ActionCallback specific fields for the action callback.
-type ActionCallback struct {
- MessageTs string `json:"message_ts"`
- AttachmentID string `json:"attachment_id"`
- Actions []AttachmentAction `json:"actions"`
-}
-
// ConfirmationField are used to ask users to confirm actions
type ConfirmationField struct {
Title string `json:"title,omitempty"` // Optional.