From 795fde6d54f390c832871c48a7f14f821ea0c6b5 Mon Sep 17 00:00:00 2001 From: imamfzn Date: Mon, 10 Apr 2023 22:58:16 +0700 Subject: [PATCH 1/2] add filter object for multi_conversation_select block --- block_element.go | 1 + 1 file changed, 1 insertion(+) diff --git a/block_element.go b/block_element.go index a70d8f2de..a1675c4c8 100644 --- a/block_element.go +++ b/block_element.go @@ -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 *SelectBlockElementFilter `json:"filter,omitempty"` Confirm *ConfirmationBlockObject `json:"confirm,omitempty"` } From d2e84d992b6f1b83a9a6724bb9c04cc96ed1dab0 Mon Sep 17 00:00:00 2001 From: imamfzn Date: Thu, 13 Apr 2023 11:22:01 +0700 Subject: [PATCH 2/2] change to ConversationListsFilter for better naming --- block_element.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/block_element.go b/block_element.go index a1675c4c8..17767e72b 100644 --- a/block_element.go +++ b/block_element.go @@ -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"` @@ -279,7 +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 *SelectBlockElementFilter `json:"filter,omitempty"` + Filter *ConversationListsFilter `json:"filter,omitempty"` Confirm *ConfirmationBlockObject `json:"confirm,omitempty"` }