summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/slack-go/slack/block_object.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/slack-go/slack/block_object.go')
-rw-r--r--vendor/github.com/slack-go/slack/block_object.go16
1 files changed, 9 insertions, 7 deletions
diff --git a/vendor/github.com/slack-go/slack/block_object.go b/vendor/github.com/slack-go/slack/block_object.go
index b6f1da4a..cc510b21 100644
--- a/vendor/github.com/slack-go/slack/block_object.go
+++ b/vendor/github.com/slack-go/slack/block_object.go
@@ -147,7 +147,7 @@ func NewTextBlockObject(elementType, text string, emoji, verbatim bool) *TextBlo
// BlockType returns the type of the block
func (t TextBlockObject) BlockType() MessageBlockType {
- if t.Type == "mrkdown" {
+ if t.Type == "mrkdwn" {
return MarkdownType
}
return PlainTextType
@@ -190,16 +190,18 @@ func NewConfirmationBlockObject(title, text, confirm, deny *TextBlockObject) *Co
//
// More Information: https://api.slack.com/reference/messaging/composition-objects#option
type OptionBlockObject struct {
- Text *TextBlockObject `json:"text"`
- Value string `json:"value"`
- URL string `json:"url,omitempty"`
+ Text *TextBlockObject `json:"text"`
+ Value string `json:"value"`
+ Description *TextBlockObject `json:"description,omitempty"`
+ URL string `json:"url,omitempty"`
}
// NewOptionBlockObject returns an instance of a new Option Block Element
-func NewOptionBlockObject(value string, text *TextBlockObject) *OptionBlockObject {
+func NewOptionBlockObject(value string, text, description *TextBlockObject) *OptionBlockObject {
return &OptionBlockObject{
- Text: text,
- Value: value,
+ Text: text,
+ Value: value,
+ Description: description,
}
}