Support for block actions
Description
With the release of Block Kit, actions embedded in blocks don't quite work with this library.
As a workaround, developers can use a very loose set of matching constraints (such as {}) and get the handler to trigger, but its then up to them to do further matching against the payload.
The payload shape is quite different. This will be tricky to support, and might involve a new method (distinct from .action()) or a breaking change.
A minimal solution would allow for matching on action_id instead of callback_id (since block actions have no callback_id). We should also consider some combination of block_id and action_id. The former can be either explicitly set when creating the message, or generated by Slack, so its not reasonable to require it in the constraints.
The action_id is described as the following:
An identifier for this action. You can use this when you receive an interaction payload to identify the source of the action. Should be unique among all other
action_ids used elsewhere by your app.
We need some more clarity about the last statement, because if action_ids are meant to be globally unique, then there's no point in matching against specific ones as a string. At best we can suggest that they all fit a pattern, and then we depend on a RegExp for the constraint.
We would appreciate ideas and discussion regarding the design of this feature.
Requirements
- [x] I've read and understood the Contributing guidelines and have done my best effort to follow them.
- [x] I've read and agree to the Code of Conduct.
- [x] I've searched for any related issues and avoided creating a duplicate issue.