unreal4u / telegram-api

Complete async capable Telegram bot API implementation for PHP7
https://github.com/unreal4u/telegram-api/wiki
MIT License
790 stars 174 forks source link

Many unwanted messages #109

Open boesbo opened 5 years ago

boesbo commented 5 years ago

unreal4u/telegram-api v3.5.0 A complete Telegram bot API implementation written in PHP, with support for inline bot

Often it happens (not always) that I send a message via the bot and I receive many more. Of the times 2/3 of the times also 10. Even with a simple code like this recalled 1 time.

$loop = Factory::create();
$sendMessage = new SendMessage();
$sendMessage->text = 'Test message';
$sendMessage->chat_id = $chatId;
$promise = $tgLog->performApiRequest($sendMessage);
$promise->then(
  function ($response) {},
  function (\Exception $exception) {
    throw new Exception($exception->getMessage());
  }
);
$loop->run();
unreal4u commented 5 years ago

Hi! Do you mean you are getting 10 exceptions? In that case, what does the exception say?

boesbo commented 4 years ago

I tested thoroughly. No exceptions are launched. It probably happens when an immediate response is not received then a second one is sent (third, fourth, fifth).