Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The unhandled exception with supergroups #40

Closed
Spalf opened this issue Apr 7, 2016 · 3 comments
Closed

The unhandled exception with supergroups #40

Spalf opened this issue Apr 7, 2016 · 3 comments
Labels

Comments

@Spalf
Copy link

Spalf commented Apr 7, 2016

After update group to supergroup with bot:
ruby/2.2.0/gems/telegram-bot-ruby-0.4.2/lib/telegram/bot/api.rb:56:incall': Telegram API has returned the error. (ok: "false", error_code: "400", description: "[Error]: Bad Request: group chat is migrated to supergroup chat", parameters: "{"migrate_to_chat_id"=>-*****************}") (Telegram::Bot::Exceptions::ResponseError)`

@arnoldtonderaimarunda
Copy link

I am having the same issue. Correct me if I am wrong, but the way I understand it, is that this error occurs only if a group is upgraded to a supergroup while the bot is a member of the group. (If a bot is added to an existing supergroup this does not occur)

When a group is migrated to a supergroup, it gets a new chat_id that is passed to the bot in the group in the field migrate_to_chat_id. This is now the chat_id that the bot should use to send messages in the group. By using the old one, we get that kind of error.

@atipugin will you be adding the ability to handle the upgraded to supergroup service message to the gem?

@atipugin
Copy link
Owner

atipugin commented Jun 9, 2016

I'm not sure how to handle it. Resend message with new chat_id? What if you store your chat ids somewhere in db? In this case you need to handle it by your own.

@github-actions
Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the stale label Feb 19, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants