Calling 'startConversation()' fails when called from the 'hears()' closure. See example below:
$botman->hears('/project', function ($bot) {$bot->startConversation(new ExampleConversation());});
This is being triggered from a Slack command, which responds with:
/project failed with the error "invalid_attachments_format"
It's worth noting that the example included works which calls a controller function. This works differently as it's triggered via an Event as opposed to a Command in the example above.
Description:
Calling 'startConversation()' fails when called from the 'hears()' closure. See example below:
$botman->hears('/project', function ($bot) {
$bot->startConversation(new ExampleConversation());
});
This is being triggered from a Slack command, which responds with:
/project failed with the error "invalid_attachments_format"
It's worth noting that the example included works which calls a controller function. This works differently as it's triggered via an Event as opposed to a Command in the example above.
$botman->hears('Start conversation', BotManController::class.'@startConversation');
Steps To Reproduce:
Setup a Slack bot, and add a command.
Create a 'hear()' function to listen out for this command. Within the closure run
$bot->startConversation(new ExampleConversation());
.Call the command from Slack.