Skip to content

Enable to use respond utility in app.view listeners (only when response_urls exists) #260

Description

@seratch

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 and AsyncApp

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.

Activity

  1. added this to the 1.5.0 milestone on Mar 19, 2021
  2. self-assigned this
    on Mar 19, 2021
  3. seratch commented on Apr 9, 2021

    @seratch
    ContributorAuthor

    This is already supported in bolt-java: slackapi/java-slack-sdk#405

  4. added a commit that references this issue on Apr 16, 2021
    fd10ebd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions