Enable to use respond utility in app.view listeners (only when response_urls exists) #260
Closed
Description
Only when a modal has a block element with response_url_enabled: true
, response_urls
can be included in its view_submission
payload. https://api.slack.com/surfaces/modals/using#modal_response_url
Currently, Bolt's respond
utility does not automatically resolve the response_url in this pattern. We're going to apply the following changes:
- Add a new parsing logic to extract
view.response_urls[0].response_url
and set it to context object - As of March 2021, the
response_urls
can have only one element. However, for possible future updates, we should check the number of elements. If there are more than one URLs, Bolt should output info-level log message saying "Although Bolt picked the first element up for respond utility for you, there are {n} elements in response_urls. If you would like to use a different one, please write a custom logic to choose the right one in your listener function." - Needless to say, this should be supported in both
App
andAsyncApp
Also, we are going to add the same feature in bolt-js and bolt-java.
Category (place an x
in each of the [ ]
)
- slack_bolt.App and/or its core components
- slack_bolt.async_app.AsyncApp and/or its core components
- Adapters in slack_bolt.adapter
- Others
Requirements
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.