File and images not receiving in Slack RTM Driver?
vipin733 opened this issue · comments
- BotMan Version: 2.0
-PHP Version: 7.1.7
-Slack RTM Driver
I'm trying to receive images and file but its seems not working only its hear text
here is my botman.php
<?php
use App\Http\Controllers\BotManController;
use Mpociot\BotMan\Messages\Message;
use BotMan\BotMan\Messages\Attachments\File;
use BotMan\BotMan\Messages\Attachments\Image;
use GuzzleHttp\Client;
$botman = resolve('botman');
$botman->hears('hi', function ($bot) {
$bot->typesAndWaits(2);
$bot->reply('Hello!');
}); // its working fine
$botman->hears('ok', function ($bot) {
$bot->typesAndWaits(2);
$bot->reply('anything else!');
}); // its working fine
$botman->receivesImages(function($bot, $images) {
foreach ($images as $image) {
$url = $image->getUrl(); // The direct url
$title = $image->getTitle(); // The title, if available
$payload = $image->getPayload(); // The original payload
}
$bot->reply('image');
}); //not working
$botman->receivesFiles(function($bot, $files) {
foreach ($files as $file) {
$url = $file->getUrl(); // The direct url
$payload = $file->getPayload(); // The original payload
}
$bot->reply('rec!');
}); // its working fine
$botman->fallback(function($bot) {
$bot->reply('I buggy now');
});
When I try to upload any file or image its always fallback problem Also is that when I try upload any file its start looping and again and again repeating "I buggy now' " infinite time unless I'm close that window
I hope you understand my issue I also raise in botman/botman
Fixed in 1.1.1
I've tried this on the lastest version of botman but it always goes to the fall back.