Closed tortilaman closed 5 years ago
Hi @tortilaman 👋
At first I saw this and got worried that maybe the Slack requests changed in some way to cause this issue, but it turns out I was just confused. I think the package is working as expected.
While this package accepts only the three values you described for the type
matching constraint for an action handler, the same cannot be said for the value inside payload
. We intentionally don't modify anything inside the payload from Slack, so that we don't end up breaking it as the API evolves. The most definitive guide of the payload format is here: https://api.slack.com/docs/interactive-message-field-guide#action_url_invocation_payload.
As you've probably noticed, message button actions specify button
as their type inside the action, not at the top level of the payload. We specifically handle that here: https://github.com/slackapi/node-slack-interactive-messages/blob/2cfc05805c79a62279ef828e3a6bd345805d8719/src/adapter.js#L426-L430
That's sort of the point of the matching constraints in this package, so that you don't have to do that digging in the payload yourself when we can make a nicer and more usable way API. If you have any needs that aren't being addressed by our matching constraints, I'd be happy to take your feedback.
Thanks @aoberoi, it seems things are actually working as intended, I think errors elsewhere were just leading to my issue.
Description
I've had my slack app working fine for some time, but for the past few days, it hasn't been responding to button presses. I've finally narrowed it down to the fact that the request payload type is
interactive_message
, which is odd because as per the documentation, the only possible values arebutton
,select
, ordialog_submission
What type of issue is this?
Requirements
Bug Report
Filling out the following details about bugs will help us solve your issue sooner.
Reproducible in:
@slack/interactive-messages version: ^1.0.0 node version: 8.11.2 OS version(s): Linux
Steps to reproduce:
1. 2. 3.
Expected result:
What you expected to happen
Actual result:
What actually happened
Attachments:
Create the message:
Button Handler:
Abridged Console Output:
Original Message:
I'm not entirely sure how to narrow it down to a reproducible code sample, so I wanted to give you enough information that hopefully you could find something. If interested, I could provide a sample repo. Let me know if there's any additional information I can provide that would be helpful.