Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: broken examples, style #1072

Merged
merged 2 commits into from Jun 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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