slack icon indicating copy to clipboard operation
slack copied to clipboard

Allow the confirmation dialog to be optional & add callback_id param

Open benperove opened this issue 8 years ago • 4 comments

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

benperove avatar Jul 17 '16 17:07 benperove

@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?

craigwillis85 avatar Aug 19 '16 14:08 craigwillis85

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.

maknz avatar Aug 20 '16 01:08 maknz

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.

benperove avatar Aug 26 '16 19:08 benperove

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
 ]);

funkytaco avatar Nov 04 '16 17:11 funkytaco