antonio-antuan / rust-tdlib

Rust client for TDlib
MIT License
57 stars 11 forks source link

Serialization error #16

Closed anwsonwsymous closed 2 years ago

anwsonwsymous commented 2 years ago

I'm trying to send message and getting this message: "Failed to parse JSON object as TDLib request: Unknown class "InputMessageText""

This is because in enum InputMessageContent you use #[serde(rename(deserialize = "inputMessageAudio"))] instead of renaming it for both -> deserialize/serialize.

I think it must be like this #[serde(rename = "inputMessageAudio")] or #[serde(rename(deserialize = "inputMessageAudio", serialize = "inputMessageAudio"))].

This is actual for all variants of InputMessageContent