diff options
author | Wim <wim@42.be> | 2020-10-11 23:07:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-11 23:07:00 +0200 |
commit | 2d98df61221e23b3be557d7b1931ee3d510ac32d (patch) | |
tree | 7898a2d3c2b3003bae97d50541443072046666f3 /vendor/github.com/slack-go/slack/block_object.go | |
parent | 219a5453f9edaa87aa7aa4b9d5f9c3de9c75b38f (diff) | |
download | matterbridge-msglm-2d98df61221e23b3be557d7b1931ee3d510ac32d.tar.gz matterbridge-msglm-2d98df61221e23b3be557d7b1931ee3d510ac32d.tar.bz2 matterbridge-msglm-2d98df61221e23b3be557d7b1931ee3d510ac32d.zip |
Update vendor (#1257)
Diffstat (limited to 'vendor/github.com/slack-go/slack/block_object.go')
-rw-r--r-- | vendor/github.com/slack-go/slack/block_object.go | 16 |
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, } } |