Sha256: d4d77c3467aa548472ebd1742ec614ea28c6cb8435dfc3e912fabb7111c3cfbb
Contents?: true
Size: 909 Bytes
Versions: 11
Compression:
Stored size: 909 Bytes
Contents
# frozen_string_literal: true module Slack module BlockKit module Composition # Determines when a plain-text input element will return a block_actions # interaction payload. # # @param [Array] triggers - values for the `trigger_actions_on` array # # https://api.slack.com/reference/block-kit/composition-objects#dispatch_action_config # https://api.slack.com/reference/block-kit/block-elements#input class DispatchActionConfiguration def initialize(triggers: nil) @triggers = triggers || [] end def trigger_on_enter_pressed @triggers << :on_enter_pressed end def trigger_on_character_entered @triggers << :on_character_entered end def as_json(*) { trigger_actions_on: @triggers.uniq }.compact end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems