{"action":"created","issue":{"url":"https://api.github.com/repos/FruitieX/teleirc/issues/52","repository_url":"https://api.github.com/repos/FruitieX/teleirc","labels_url":"https://api.github.com/repos/FruitieX/teleirc/issues/52/labels{/name}","comments_url":"https://api.github.com/repos/FruitieX/teleirc/issues/52/comments","events_url":"https://api.github.com/repos/FruitieX/teleirc/issues/52/events","html_url":"https://github.com/FruitieX/teleirc/issues/52","id":139248063,"number":52,"title":"Upgrading to a supergroup doesn't update chat_id file","user":{"login":"lagleki","id":2412817,"avatar_url":"https://avatars.githubusercontent.com/u/2412817?v=3","gravatar_id":"","url":"https://api.github.com/users/lagleki","html_url":"https://github.com/lagleki","followers_url":"https://api.github.com/users/lagleki/followers","following_url":"https://api.github.com/users/lagleki/following{/other_user}","gists_url":"https://api.github.com/users/lagleki/gists{/gist_id}","starred_url":"https://api.github.com/users/lagleki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lagleki/subscriptions","organizations_url":"https://api.github.com/users/lagleki/orgs","repos_url":"https://api.github.com/users/lagleki/repos","events_url":"https://api.github.com/users/lagleki/events{/privacy}","received_events_url":"https://api.github.com/users/lagleki/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/FruitieX/teleirc/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"FruitieX","id":3673134,"avatar_url":"https://avatars.githubusercontent.com/u/3673134?v=3","gravatar_id":"","url":"https://api.github.com/users/FruitieX","html_url":"https://github.com/FruitieX","followers_url":"https://api.github.com/users/FruitieX/followers","following_url":"https://api.github.com/users/FruitieX/following{/other_user}","gists_url":"https://api.github.com/users/FruitieX/gists{/gist_id}","starred_url":"https://api.github.com/users/FruitieX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FruitieX/subscriptions","organizations_url":"https://api.github.com/users/FruitieX/orgs","repos_url":"https://api.github.com/users/FruitieX/repos","events_url":"https://api.github.com/users/FruitieX/events{/privacy}","received_events_url":"https://api.github.com/users/FruitieX/received_events","type":"User","site_admin":false},"milestone":null,"comments":6,"created_at":"2016-03-08T11:06:04Z","updated_at":"2016-04-08T13:05:22Z","closed_at":null,"body":"After upgrading to supergroup teleirc can no longer send messages from IRC to Telegram.\r\nThe error is\r\n```Unhandled rejection Error: 400 {\"ok\":false,\"error_code\":400,\"description\":\"[Error]: Bad Request: group chat is migrated to supergroup chat\",\"parameters\":{\"migrate_to_chat_id\":...```\r\n\r\n\r\n\"migrate_to_chat_id\" has the necessary id. Teleirc should instead of outputting error use that id to write it to chat_id and resend failed messages (if any)."},"comment":{"url":"https://api.github.com/repos/FruitieX/teleirc/issues/comments/207423980","html_url":"https://github.com/FruitieX/teleirc/issues/52#issuecomment-207423980","issue_url":"https://api.github.com/repos/FruitieX/teleirc/issues/52","id":207423980,"user":{"login":"FruitieX","id":3673134,"avatar_url":"https://avatars.githubusercontent.com/u/3673134?v=3","gravatar_id":"","url":"https://api.github.com/users/FruitieX","html_url":"https://github.com/FruitieX","followers_url":"https://api.github.com/users/FruitieX/followers","following_url":"https://api.github.com/users/FruitieX/following{/other_user}","gists_url":"https://api.github.com/users/FruitieX/gists{/gist_id}","starred_url":"https://api.github.com/users/FruitieX/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FruitieX/subscriptions","organizations_url":"https://api.github.com/users/FruitieX/orgs","repos_url":"https://api.github.com/users/FruitieX/repos","events_url":"https://api.github.com/users/FruitieX/events{/privacy}","received_events_url":"https://api.github.com/users/FruitieX/received_events","type":"User","site_admin":false},"created_at":"2016-04-08T13:05:22Z","updated_at":"2016-04-08T13:05:22Z","body":"@qvazzler I took a look, it seems when upgrading to a supergroup a `message` event is emitted with the `migrate_to_chat_id` set to the new chat_id. So the bot has to listen for this event and always check if this field is present, and in that case start using the new chatId. teleirc will handle this correctly in the next release."}}