First of all, thank you for the great work. I'm actively developing a Telegram bot, and recently migrated from https://github.com/go-telegram-bot-api/telegram-bot-api to this package, and I'm pleased using your packge. Great work in the simple, and fluent API design!
Bug Report
After upgrading to v0.7.7, I'm seeing duplicate error logs on receiving updates containing inline keyboard button reply messages similar to the following:
2023/04/26 10:53:09 [TGBOT] [ERROR] error get updates, error decode response result for method getUpdates, json: cannot unmarshal object into Go struct field Message.callback_query.message.reply_markup of type models.ReplyMarkup
2023/04/26 10:53:09 [TGBOT] [ERROR] error get updates, error decode response result for method getUpdates, json: cannot unmarshal object into Go struct field Message.callback_query.message.reply_markup of type models.ReplyMarkup
2023/04/26 10:53:10 [TGBOT] [ERROR] error get updates, error decode response result for method getUpdates, json: cannot unmarshal object into Go struct field Message.callback_query.message.reply_markup of type models.ReplyMarkup
2023/04/26 10:53:10 [TGBOT] [ERROR] error get updates, error decode response result for method getUpdates, json: cannot unmarshal object into Go struct field Message.callback_query.message.reply_markup of type models.ReplyMarkup
2023/04/26 10:53:11 [TGBOT] [ERROR] error get updates, error decode response result for method getUpdates, json: cannot unmarshal object into Go struct field Message.callback_query.message.reply_markup of type models.ReplyMarkup
2023/04/26 10:53:13 [TGBOT] [ERROR] error get updates, error decode response result for method getUpdates, json: cannot unmarshal object into Go struct field Message.callback_query.message.reply_markup of type models.ReplyMarkup
2023/04/26 10:53:16 [TGBOT] [ERROR] error get updates, error decode response result for method getUpdates, json: cannot unmarshal object into Go struct field Message.callback_query.message.reply_markup of type models.ReplyMarkup
Steps to Reproduce
Set proper Telegram Bot Token in the EXAMPLE_TELEGRAM_BOT_TOKEN environment variable
Run the inline_keyboard example package: go run ./examples/inline_keyboard/
Send message with "button" text to the robot
You'll see bunch of repetitive error logs in your terminal
How I Fixed
There are two points to mention that I considered for this fix:
As you changed the models.ReplyMarkup type from an alias of the type any to an interface type, there's no way for the encoding/json.Unmarshal function to parse it as there is no actual type as its parse destination.
I hope that this makes sense. Please let me know if there are any concerns, or issues that I forgot.
First of all, thank you for the great work. I'm actively developing a Telegram bot, and recently migrated from https://github.com/go-telegram-bot-api/telegram-bot-api to this package, and I'm pleased using your packge. Great work in the simple, and fluent API design!
Bug Report
After upgrading to v0.7.7, I'm seeing duplicate error logs on receiving updates containing inline keyboard button reply messages similar to the following:
Steps to Reproduce
EXAMPLE_TELEGRAM_BOT_TOKEN
environment variableinline_keyboard
example package:go run ./examples/inline_keyboard/
How I Fixed
There are two points to mention that I considered for this fix:
models.Message
struct type, thereply_markup
field is of type InlineKeyboardMarkup, which corresponds tomodels.InlineKeyboardMarkup
struct type.models.ReplyMarkup
type from an alias of the typeany
to an interface type, there's no way for theencoding/json.Unmarshal
function to parse it as there is no actual type as its parse destination.I hope that this makes sense. Please let me know if there are any concerns, or issues that I forgot.
Cheers