node-slack-interactive-messages
node-slack-interactive-messages copied to clipboard
Allow RegExp callback_id constraint matches to expose match results
Description
If the adapter is going to use a RegExp to match against the callback_id, it would be useful to be able to pick out the parts in a capture group so you don't have to once again parse the callback_id inside the handler.
This would probably look like:
- Change the matching implementation from using
RegExp.test()toRegExp.exec() - Expose the return value to the handler function, somehow. Ideas:
- as another argument to the handler,
handler(payload, respond, matches)wherematchesis the value - inside an
extproperty ofpayload, so that in the future there is a dedicated namespace for new types of data to be exposed to the handler from. so, for example, you might find these results inpayload.ext.callbackIdMatches.
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.
Addressed by #138. If this seems like a mistake, please fell free to open a new issue in this project's new repository.