Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ExpressReceiver's RespondFn implementation doesn't accept a string #377

Closed
4 of 9 tasks
seratch opened this issue Jan 21, 2020 · 0 comments · Fixed by #379
Closed
4 of 9 tasks

ExpressReceiver's RespondFn implementation doesn't accept a string #377

seratch opened this issue Jan 21, 2020 · 0 comments · Fixed by #379
Assignees
Labels
bug M-T: confirmed bug report. Issues are confirmed when the reproduction steps are documented

Comments

@seratch
Copy link
Member

seratch commented Jan 21, 2020

Description

The default implementation of respond by ExpressReceiver doesn't accept a string argument. It has been working only with RespondArguments since version 1.0.0.

Thank you @marks for reporting this issue. Refer to the thread in Slack Community Workspace.

--- (His original report there) ---

https://slack.dev/bolt docs say I can use:

respond(`You selected <@${action.selected_user}>`);

but when I try to do something like this, I get a 500 / invalid_payload back from the Slack API.
It appears you need to do:

respond({text: `You selected <@${action.selected_user}>`});

Is this a bug/regression? It seems the Slack webhook/response URLs do not take plain text

What type of issue is this? (place an x in one of the [ ])

  • bug
  • enhancement (feature request)
  • question
  • documentation related
  • testing related
  • discussion

Requirements (place an x in each of the [ ])

  • I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've searched for any related issues and avoided creating a duplicate issue.

Bug Report

Reproducible in:

package version: any
node version: any
OS version(s): any

Steps to reproduce:

  1. Have respond("Hi there!"); in a Bolt app

Expected result:

The API call successfully completes.

Actual result:

The Bolt app gets a 500 / invalid_payload back from the Slack API.

Attachments:

@seratch seratch added the bug M-T: confirmed bug report. Issues are confirmed when the reproduction steps are documented label Jan 21, 2020
@seratch seratch self-assigned this Jan 21, 2020
seratch added a commit to seratch/bolt-js that referenced this issue Jan 21, 2020
seratch added a commit that referenced this issue Jan 22, 2020
Fix #377 ExpressReceiver's RespondFn implementation doesn't accept a string
seratch added a commit to seratch/bolt-js that referenced this issue Jan 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug M-T: confirmed bug report. Issues are confirmed when the reproduction steps are documented
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant