summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/slack-go/slack/block_conv.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2021-02-01 21:29:04 +0100
committerGitHub <noreply@github.com>2021-02-01 21:29:04 +0100
commit0452be0cb383ff560e340b643b60a35c6e228639 (patch)
tree41b91af43c2e321d6498a6b56594b1d0c71c516e /vendor/github.com/slack-go/slack/block_conv.go
parent1624f107739b8ed7b142732430e5295764388de2 (diff)
downloadmatterbridge-msglm-0452be0cb383ff560e340b643b60a35c6e228639.tar.gz
matterbridge-msglm-0452be0cb383ff560e340b643b60a35c6e228639.tar.bz2
matterbridge-msglm-0452be0cb383ff560e340b643b60a35c6e228639.zip
Update vendor (#1384)
Diffstat (limited to 'vendor/github.com/slack-go/slack/block_conv.go')
-rw-r--r--vendor/github.com/slack-go/slack/block_conv.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/vendor/github.com/slack-go/slack/block_conv.go b/vendor/github.com/slack-go/slack/block_conv.go
index 656a9ab1..f2d744c4 100644
--- a/vendor/github.com/slack-go/slack/block_conv.go
+++ b/vendor/github.com/slack-go/slack/block_conv.go
@@ -59,6 +59,8 @@ func (b *Blocks) UnmarshalJSON(data []byte) error {
block = &DividerBlock{}
case "file":
block = &FileBlock{}
+ case "header":
+ block = &HeaderBlock{}
case "image":
block = &ImageBlock{}
case "input":
@@ -105,6 +107,8 @@ func (b *InputBlock) UnmarshalJSON(data []byte) error {
switch s.TypeVal {
case "datepicker":
e = &DatePickerBlockElement{}
+ case "timepicker":
+ e = &TimePickerBlockElement{}
case "plain_text_input":
e = &PlainTextInputBlockElement{}
case "static_select", "external_select", "users_select", "conversations_select", "channels_select":
@@ -262,6 +266,12 @@ func (a *Accessory) UnmarshalJSON(data []byte) error {
return err
}
a.DatePickerElement = element.(*DatePickerBlockElement)
+ case "timepicker":
+ element, err := unmarshalBlockElement(r, &TimePickerBlockElement{})
+ if err != nil {
+ return err
+ }
+ a.TimePickerElement = element.(*TimePickerBlockElement)
case "plain_text_input":
element, err := unmarshalBlockElement(r, &PlainTextInputBlockElement{})
if err != nil {
@@ -324,6 +334,9 @@ func toBlockElement(element *Accessory) BlockElement {
if element.DatePickerElement != nil {
return element.DatePickerElement
}
+ if element.TimePickerElement != nil {
+ return element.TimePickerElement
+ }
if element.PlainTextInputElement != nil {
return element.PlainTextInputElement
}