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

Add Filter Object to Multi Conversation Select Block Element #1191

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
7 changes: 4 additions & 3 deletions block_element.go
Expand Up @@ -217,15 +217,15 @@ type SelectBlockElement struct {
InitialChannel string `json:"initial_channel,omitempty"`
DefaultToCurrentConversation bool `json:"default_to_current_conversation,omitempty"`
ResponseURLEnabled bool `json:"response_url_enabled,omitempty"`
Filter *SelectBlockElementFilter `json:"filter,omitempty"`
Filter *ConversationListsFilter `json:"filter,omitempty"`
MinQueryLength *int `json:"min_query_length,omitempty"`
Confirm *ConfirmationBlockObject `json:"confirm,omitempty"`
}

// SelectBlockElementFilter allows to filter select element conversation options by type.
// ConversationListsFilter allows to filter select element conversation options by type.
//
// More Information: https://api.slack.com/reference/block-kit/composition-objects#filter_conversations
type SelectBlockElementFilter struct {
type ConversationListsFilter struct {
Include []string `json:"include,omitempty"`
ExcludeExternalSharedChannels bool `json:"exclude_external_shared_channels,omitempty"`
ExcludeBotUsers bool `json:"exclude_bot_users,omitempty"`
Expand Down Expand Up @@ -279,6 +279,7 @@ type MultiSelectBlockElement struct {
InitialChannels []string `json:"initial_channels,omitempty"`
MinQueryLength *int `json:"min_query_length,omitempty"`
MaxSelectedItems *int `json:"max_selected_items,omitempty"`
Filter *ConversationListsFilter `json:"filter,omitempty"`
Confirm *ConfirmationBlockObject `json:"confirm,omitempty"`
}

Expand Down