Confirmation Box Not Working
Description
I'm trying to add a dialog box to confirm a button click / dropdown in interactive messages.
What type of issue is this? (place an x in one of the [ ])
- [ x ] question
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.
Bug Report
Filling out the following details about bugs will help us solve your issue sooner.
Reproducible in:
@slack/interactive-messages version: node version: OS version(s):
Steps to reproduce:
- Visit the interactive message builder featuring thai food.
- Try to add the confirm code in the elements section of the buttons:
"confirm": { "title": "Are you sure?", "text": "Wouldn't you prefer a good game of chess?", "ok_text": "Yes", "dismiss_text": "No" }
- Try to compile the interactive message
Expected result:
It should create an interactive message with a dialog confirmation box, but it doesn't
Actual result:
Doesn't allow confirm
@shanedewael Any thoughts? cc. @aoberoi
@awcchungster There's two problems I see with your payload. ok_text and dismiss_text should be confirm and deny with Block Kit. The second is that all text should be text objects (so plain-text objects in this case). Here's a payload I got to work for confirm:
"confirm": {
"title": {
"type": "plain_text",
"text": "Are you sure?"
},
"text": {
"type": "plain_text",
"text": "Wouldn't you prefer a good game of chess?"
},
"confirm": {
"type": "plain_text",
"text": "Ok"
},
"deny": {
"type": "plain_text",
"text": "No"
}
}
Gotcha, thanks! I got the template from your documentation, so if it's wrong, I recommend updating it or clarifying.
https://github.com/slackapi/node-slack-sdk/issues/781
@shanedewael I tried reopening another case related to this.
Closing out this issue since it's duplicated in the main repository for this package (https://github.com/slackapi/node-slack-sdk/issues/781)