slack
slack copied to clipboard
Allow the confirmation dialog to be optional & add callback_id param
I've updated to make button confirmations optional. Slack suggests to use confirmations sparingly: https://api.slack.com/docs/message-buttons#guidelines_and_best_practices
Also, callback_id
is a required attachment field:
https://api.slack.com/docs/message-buttons#attachment_fields
@maknz, @benperove - can this please be merged in? I'm wanting to use the Button API, but it needs the callback_id
and it is currently missing from this and the PR fixes it for me
@benperove - are you able to fix the failing tests and update the PR?
@maknz - if the above is done, can you please merge?
Happy to merge if the test suite passes. Unfortuantely I'm low on time so I won't be able to do the necessary work to make a stable release, at least right now.
The code that I added was pretty straightforward, but I was unaware the tests (or lack thereof) were going to cause the build to fail, so my apologies if I've held anyone up because of this. I will try to add the unit tests possibly by this weekend and get everything squared away.
Hi, I know this isn't ready yet, but how do I put a callback_id in my client? Can I just put it in my $slackSettings?
Here is my config.
$slackSettings = [
'username' => 'foo',
'link_names' => true
];
$injector->define('Main\Modules\Slack\Slack_Client_Module', [
':endpoint' => $arrCfgEnvSettings['slack']['foo']['webhook-url'],
':attributes' => $slackSettings,
':guzzle' => null
]);