forked from lug/matterbridge
Update dependencies for 1.18.0 release (#1175)
This commit is contained in:
14
vendor/github.com/slack-go/slack/block_conv.go
generated
vendored
14
vendor/github.com/slack-go/slack/block_conv.go
generated
vendored
@@ -2,6 +2,7 @@ package slack
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
@@ -172,10 +173,12 @@ func (b *BlockElements) UnmarshalJSON(data []byte) error {
|
||||
blockElement = &DatePickerBlockElement{}
|
||||
case "plain_text_input":
|
||||
blockElement = &PlainTextInputBlockElement{}
|
||||
case "checkboxes":
|
||||
blockElement = &CheckboxGroupsBlockElement{}
|
||||
case "static_select", "external_select", "users_select", "conversations_select", "channels_select":
|
||||
blockElement = &SelectBlockElement{}
|
||||
default:
|
||||
return errors.New("unsupported block element type")
|
||||
return fmt.Errorf("unsupported block element type %v", blockElementType)
|
||||
}
|
||||
|
||||
err = json.Unmarshal(r, blockElement)
|
||||
@@ -275,6 +278,12 @@ func (a *Accessory) UnmarshalJSON(data []byte) error {
|
||||
return err
|
||||
}
|
||||
a.MultiSelectElement = element.(*MultiSelectBlockElement)
|
||||
case "checkboxes":
|
||||
element, err := unmarshalBlockElement(r, &CheckboxGroupsBlockElement{})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
a.CheckboxGroupsBlockElement = element.(*CheckboxGroupsBlockElement)
|
||||
default:
|
||||
element, err := unmarshalBlockElement(r, &UnknownBlockElement{})
|
||||
if err != nil {
|
||||
@@ -313,6 +322,9 @@ func toBlockElement(element *Accessory) BlockElement {
|
||||
if element.RadioButtonsElement != nil {
|
||||
return element.RadioButtonsElement
|
||||
}
|
||||
if element.CheckboxGroupsBlockElement != nil {
|
||||
return element.CheckboxGroupsBlockElement
|
||||
}
|
||||
if element.SelectElement != nil {
|
||||
return element.SelectElement
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user