no response on InlineKeyboardButton press after updating telegram-bot-api to v5.5.1
LazarenkoA opened this issue · 1 comments
Hello, I have a bot that is deployed on a server and is running on telegram-bot-api version v4.6.4. Locally, I updated telegram-bot-api to version v5.5.1 (I wanted to resolve the issue described here: #480). Locally, to make polling work, I also added:
_, err = t.bot.Request(&tgbotapi.DeleteWebhookConfig{DropPendingUpdates: true})
After launching locally, the webhook was deleted, and the bot works, but I noticed that no updates are being received in the update channel when pressing the InlineKeyboardButton. So, I stopped the bot locally and launched it again on the server (which runs the v4.6.4 version with a webhook), but this time Telegram didn't send updates on button presses either.
What could be the reason? Could I have broken something, or is this definitely a problem on Telegram's side?
I discovered the cause.
Telegram Bot API method getUpdates has a parameter called allowed_updates. If the parameter is not specified, the previous setting will be used...
When I ran the example, it used AllowedUpdates = []string{"message", "chat_member"}, but I needed to add callback_query."