TelegramBot / Api

Native PHP Wrapper for Telegram BOT API
MIT License
1.09k stars 323 forks source link

Нет возможности удалить ожидающие обновления при установке/удалении хука #361

Closed theAngriestman closed 2 years ago

theAngriestman commented 2 years ago

В методе установки и удаления веб хука есть параметр drop_pending_updates, который очищает очередь обновлений. Было бы отлично, если бы его добавили в методы setWebhook и deleteWebhook как необязательный параметр https://core.telegram.org/bots/api#setwebhook

psylosss commented 2 years ago

as a temporary $bot->call('setWebhook', ['url' => $webhookUrl, 'allowed_updates' => $allowedUpdates]);

theAngriestman commented 2 years ago

I did almost the same $this->client->call('setWebhook', ['url' => $webhook_url, 'certificate' => null, 'drop_pending_updates' => true]); the drop_pending_updates option will remove all pending updates from the server