Skip to content

Commit

Permalink
Merge pull request #1072 from slack-go/fix-broken-example
Browse files Browse the repository at this point in the history
fix: broken examples, style
  • Loading branch information
kanata2 committed Jun 2, 2022
2 parents b2bdf74 + b67cada commit 8db8a65
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion examples/modal_users/users.go
Expand Up @@ -38,12 +38,13 @@ func main() {
// Section with users select - this input will not be included in the view_submission's view.state.values,
// but instead be sent as a "block_actions" request
additionalInviteeText := slack.NewTextBlockObject(slack.PlainTextType, "Invitee from complete list of users", false, false)
additionalInviteeHintText := slack.NewTextBlockObject(slack.PlainTextType, "", false, false)
additionalInviteeOption := slack.NewOptionsSelectBlockElement(slack.OptTypeUser, additionalInviteeText, "user")
additionalInviteeSection := slack.NewSectionBlock(additionalInviteeText, nil, slack.NewAccessory(additionalInviteeOption))

// Input with users select - this input will be included in the view_submission's view.state.values
// It can be fetched as for example "payload.View.State.Values["user"]["user"].SelectedUser"
additionalInviteeBlock := slack.NewInputBlock("user", additionalInviteeText, additionalInviteeOption)
additionalInviteeBlock := slack.NewInputBlock("user", additionalInviteeText, additionalInviteeHintText, additionalInviteeOption)

checkboxTxt := slack.NewTextBlockObject(slack.PlainTextType, "Checkbox", false, false)
checkboxOptions := createOptionBlockObjects([]string{"option 1", "option 2", "option 3"}, false)
Expand Down
2 changes: 1 addition & 1 deletion slackevents/inner_events.go
Expand Up @@ -502,7 +502,7 @@ const (
// EmojiChanged A custom emoji has been added or changed
EmojiChanged = EventsAPIType("emoji_changed")
// WorkflowStepExecute Happens, if a workflow step of your app is invoked
WorkflowStepExecute = EventsAPIType("workflow_step_execute")
WorkflowStepExecute = EventsAPIType("workflow_step_execute")
)

// EventsAPIInnerEventMapping maps INNER Event API events to their corresponding struct
Expand Down
1 change: 1 addition & 0 deletions workflow_step_test.go
Expand Up @@ -124,6 +124,7 @@ func configModalBlocks() Blocks {
inputBlock := NewInputBlock(
IDSelectOptionBlock,
NewTextBlockObject("plain_text", "Select an option", false, false),
NewTextBlockObject("plain_text", "Hint", false, false),
selection,
)

Expand Down

0 comments on commit 8db8a65

Please sign in to comment.