Skip to content

Commit

Permalink
update UnmarshalJSON for NumberInputBlockElement
Browse files Browse the repository at this point in the history
  • Loading branch information
sedyn committed Nov 25, 2022
1 parent 2f1cae1 commit 5da22aa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions block_conv.go
Expand Up @@ -122,6 +122,8 @@ func (b *InputBlock) UnmarshalJSON(data []byte) error {
e = &OverflowBlockElement{}
case "radio_buttons":
e = &RadioButtonsBlockElement{}
case "number_input":
e = &NumberInputBlockElement{}
default:
return errors.New("unsupported block element type")
}
Expand Down Expand Up @@ -192,6 +194,8 @@ func (b *BlockElements) UnmarshalJSON(data []byte) error {
blockElement = &RadioButtonsBlockElement{}
case "static_select", "external_select", "users_select", "conversations_select", "channels_select":
blockElement = &SelectBlockElement{}
case "number_input":
blockElement = &NumberInputBlockElement{}
default:
return fmt.Errorf("unsupported block element type %v", blockElementType)
}
Expand Down

0 comments on commit 5da22aa

Please sign in to comment.