fewensa / telegram-client

Rust Telegram Client
MIT License
93 stars 13 forks source link

Panic on unexpected format of authorizationStateWaitCode #8

Closed Matthias-Fauconneau closed 5 years ago

Matthias-Fauconneau commented 5 years ago

{"@type":"updateAuthorizationState","authorization_state":{"@type":"authorizationStateWaitCode","code_info":{"@type":"authenticationCodeInfo","phone_number":"...","type":{"@type":"authenticationCodeTypeTelegramMessage","length":5},"next_type":{"@type":"authenticationCodeTypeSms","length":0},"timeout":0}}} SerdeJson(Error("unknown field \"{} can\'t deserialize to {}::{}\", authorizationStateWaitCode,\nAuthorizationState, WaitCode, _e, expected \"{:?}\", _e", line: 1, column: 315))

fewensa commented 5 years ago

Thanks report this issue. The new commit is fix it, you can try it, change dependency use master branch. and feedback any question. If ok i will create a new version to crate.io