stoiveyp / Slack.NetStandard

.NET Core package that helps with Slack interactions
MIT License
41 stars 16 forks source link

Add dispatch_action_config (et al) to plain_text_input #55

Closed DHowett closed 2 years ago

DHowett commented 2 years ago

This commit introduces support for configuring the dispatch_action_config and its trigger_actions_on member to input block elements that contain a plain_text_input.

DHowett commented 2 years ago

I was iffy on the name ActionTrigger, as it is somewhat generic and does not match any names explicitly documented in the Slack API. I guess it calls them "Interaction Types", but they're more of a PlainTextInputInteractionType given how specific this feature is.

DHowett commented 2 years ago

Done, and thanks for the quick review!

Test    Duration    Traits  Error Message
Slack.NetStandard.Tests.BlockTests.PlainTextInputElementSupportsDispatchConfig Passed   25 ms       

Unfortunately, there's another test that's failing on my machine. I don't think it's related, but for posterity:

Test    Duration    Traits  Error Message
Slack.NetStandard.Tests.WebApiTests_Chat.Chat_PostScheduled Failed  1 ms        System.InvalidOperationException : PostAt zero or before now