jTelegram / jTelegramBotAPI

Java Telegram Bot API Wrapper
https://jtelegram.github.io/jTelegramBotAPI/
MIT License
20 stars 12 forks source link

Support for migrate_to_chat_id missing #23

Closed nickrobson closed 6 years ago

nickrobson commented 6 years ago

The bot currently errors with an NPE when a message update of type migrate_to_chat_id is received. (That is, when the bot sees a group upgrade to a supergroup.)

The bot will error out every time it launches as it fails to handle the update and so crashes the event handler.

i.e. The bot becomes unresponsive once it encounters such an update.

The fix required should just be adding a new MessageType to handle it.

There exists a class for this, SupergroupChatCreatedMessage, however it's unused and lacks a corresponding Event class.