Giter VIP home page Giter VIP logo

rust-tdlib's Introduction

rust-tdlib

Rust client for TDlib. Library allows you to interact with Telegram Database library. Currently, supports tdlib v1.8.0.

Features

  • client - provides total integration with TDlib API. See examples directory. Enabled by default. rust-tdlib provides only TDlib types without this feature.

Run example

  1. Build tdlib.
  2. Register your app and get api_hash and api_id.
  3. RUST_LOG=info API_ID=api_id API_HASH=api_hash cargo run --example main
  4. RUST_LOG=info API_ID=api_id API_HASH=api_hash cargo run --example read_updates

rust-tdlib's People

Contributors

antonio-antuan avatar anwsonwsymous avatar melix99 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

rust-tdlib's Issues

Having trouble with authorization flow [windows]

I'm trying to reproduce some of the functions I have working on MacOS, but I'm getting the following error:

[2023-09-07T22:35:01Z WARN  rust_tdlib::client::worker] error received and possibly cannot be handled because of empty state receiver for client 1: Error { extra: Some("9317c4f9-99e0-499f-98e4-7eb076969d4f"), client_id: Some(1), code: 400, message: "Valid api_id must be provided. Can be obtained at https://my.telegram.org" }

Seems like the tdlib_params aren't being set properly, because when I set the verbosity level to 3, I see the following tdlib_params being sent:

[ 3][t 5][1694126101.514971256][Td.cpp:2966][#1][!Td][&td_requests]     Receive request 2: setTdlibParameters {
  use_test_dc = false
  database_directory = ""
  files_directory = ""
  database_encryption_key = bytes [0] { }
  use_file_database = false
  use_chat_info_database = false
  use_message_database = false
  use_secret_chats = false
  api_id = 0
  api_hash = ""
  system_language_code = ""
  device_model = ""
  system_version = ""
  application_version = ""
  enable_storage_optimizer = false
  ignore_file_names = false
}

Here's the code I'm using (essentially the same as on docs.rs):

    let mut worker = Worker::builder().build().unwrap();
    let waiter = worker.start();
    let tdlib_params = TdlibParameters::builder().api_id(var("API_ID").unwrap().parse::<i32>().unwrap()).api_hash(var("API_HASH").unwrap()).build();
    let client = rust_tdlib::client::Client::builder().with_tdlib_parameters(tdlib_params).build().unwrap();

    log::info!("Client {:#?}", client);

    log::info!("Worker {:#?}", worker);

    let client = worker.bind_client(client).await.unwrap();
    let me = client.get_me(GetMe::builder().build()).await.unwrap();
    println!("{:?}", me);

I've checked that the environmental variables are set and retrieved correctly.

Why use outdated tdlib?

Hi!
Thank you for great crate!

Looks like we wrongly understand tglib releases.

Just read tdlib developers explanation : "The recommended commit to use would still be the last commit from the master branch."

The Bad news:

The 1.8.0 is NOT CURRENT version.
It is outdated, bugged and not updated around a year.

Current stable and updated Tglib release is 1.8.9

So 1.8.0 has been outdated 9 versions back.
It is like using Windows 8 when all other use Windows 11.

Yes tdlib has had too many changes, but I think just now they are growing fast.

The Good news:
Breaking changes are less frequent, only commits with "Update layer to 137" for example.

So I am afraid, you mission of fixing memory bugs like libtdjson Memory Leak as well as any other bugs, has no point.
Because the current tdlib was updated many times and that has already repaired many different bugs.

So looks like it is better to use your great efforts for updating rust-tdlib to the current version of tdlib.

thread 'main' has overflowed its stack

I am running the main.rs example program on Windows 10 (latest update).

I have built TDLib and placed the files in a lib/ folder in the project, I link it with a build.rs file that contains :

fn main() {
    println!("cargo:rustc-link-search=lib/tdlib/lib");
}

I have also placed TDLib's DLL into the target/debug/ folder.

At first I only had rust-tdlib = "0.2.0" in my Cargo.toml dependencies, didn't compile, but through trial and error I added libraries one by one, now this is my Cargo.toml file :

[package]
name = "myapp-rs"
version = "0.1.0"
authors = ["me"]
edition = "2018"
build = "build.rs"

[dependencies]
rust-tdlib = "0.2.0"
tokio = { version = "1.4.0", features = [ "macros", "rt", "time", "rt-multi-thread" ] }
log = "0.4"
env_logger = "0.8"

Now when I launch the main.rs example file I get these logs :

C:/Users/me/.cargo/bin/cargo.exe run --color=always --package myapp-rs --bin myapp-rs
    Finished dev [unoptimized + debuginfo] target(s) in 0.18s
     Running `target\debug\myapp-rs.exe`

thread 'main' has overflowed its stack
error: process didn't exit successfully: `target\debug\myapp-rs.exe` (exit code: 0xc00000fd, STATUS_STACK_OVERFLOW)

Process finished with exit code -1073741571 (0xC00000FD)

What am I doing wrong ?

Unable to get updates

Problem: when a text message is send to tested account, no update shows up.
Info: GetMe works ok.
Info: auth data is set up at "tddb_auth".
Full src:

use rust_tdlib::types::{
    FormattedText, GetMe, InputMessageContent, InputMessageText, SendMessage, Update,
};
use rust_tdlib::{
    client::{Client, ClientState, SignalAuthStateHandler, Worker},
    tdjson,
    types::TdlibParameters,
};

fn init_log() {
    tdjson::set_log_verbosity_level(1);
    log4rs::init_file("config/log4rs.yml", Default::default()).unwrap();
}
#[tokio::main]
async fn main() {
    init_log();
    let db_dir = "tddb_auth";

    let api_id = ;
    let api_hash = ;

    let tdlib_parameters = TdlibParameters::builder()
        .database_directory(db_dir)
        .use_test_dc(true)
        .api_id(api_id)
        .api_hash(api_hash)
        .system_language_code("en")
        .device_model("Desktop")
        .system_version("Unknown")
        .application_version("1.0.0")
        .enable_storage_optimizer(true)
        .build();

    let (sender, mut receiver) = tokio::sync::mpsc::channel::<Box<Update>>(100);

    let client = Client::builder()
        .with_tdlib_parameters(tdlib_parameters)
        .with_updates_sender(sender)
        .with_auth_state_channel(10)
        .build()
        .unwrap();

    let (sx, rx) = tokio::sync::mpsc::channel(5);
    sx.send("".to_string()).await.unwrap(); // empty encryption key
    let auth_handler = SignalAuthStateHandler::new(rx);
    let mut worker = Worker::builder()
        .with_auth_state_handler(auth_handler)
        .build()
        .unwrap();

    worker.start();

    let client = worker.bind_client(client).await.unwrap();

    let me = client.get_me(GetMe::builder().build()).await.unwrap();
    log::info!("me: {:?}", me);

    let mut wait_messages: i32 = 100;
    while let Some(message) = receiver.recv().await {
        log::info!("updates handler received {:?}", message);
        wait_messages -= 1;
        if wait_messages == 0 {
            break;
        }
    }

    log::info!("stop client");
    client.stop().await.unwrap();
    log::info!("client stopped");
    loop {
        if worker.wait_client_state(&client).await.unwrap() == ClientState::Closed {
            log::info!("closed");
            break;
        }
    }

    log::info!("stop worker");
    worker.stop();
}

full output:

    Finished dev [unoptimized + debuginfo] target(s) in 6.03s
     Running `target/debug/tg_bot_tdlib`
2022-12-21T13:35:23.346733552+08:00 DEBUG rust_tdlib::client::worker - new client created: 1
2022-12-21T13:35:23.346836158+08:00 DEBUG rust_tdlib::client::worker - new client added
2022-12-21T13:35:23.347597030+08:00 DEBUG rust_tdlib::client::worker - received new auth state: UpdateAuthorizationState { extra: None, client_id: Some(1), authorization_state: WaitTdlibParameters(AuthorizationStateWaitTdlibParameters { extra: None, client_id: None }) }
2022-12-21T13:35:23.347646947+08:00 DEBUG rust_tdlib::client::worker - handling new auth state: WaitTdlibParameters(AuthorizationStateWaitTdlibParameters { extra: None, client_id: None })
2022-12-21T13:35:23.347669625+08:00 DEBUG rust_tdlib::client::worker - going to set tdlib parameters
2022-12-21T13:35:23.348796696+08:00 DEBUG rust_tdlib::client::worker - tdlib parameters set
2022-12-21T13:35:23.348821258+08:00 DEBUG rust_tdlib::client::worker - state changes handled properly
2022-12-21T13:35:23.348838910+08:00 DEBUG rust_tdlib::client::worker - received new auth state: UpdateAuthorizationState { extra: None, client_id: Some(1), authorization_state: WaitEncryptionKey(AuthorizationStateWaitEncryptionKey { extra: None, client_id: None, is_encrypted: true }) }
2022-12-21T13:35:23.348857752+08:00 DEBUG rust_tdlib::client::worker - handling new auth state: WaitEncryptionKey(AuthorizationStateWaitEncryptionKey { extra: None, client_id: None, is_encrypted: true })
2022-12-21T13:35:23.348874695+08:00 INFO rust_tdlib::client::auth_handler - waiting for encryption key
2022-12-21T13:35:23.348893273+08:00 INFO rust_tdlib::client::auth_handler - get encryption key
2022-12-21T13:35:23.348908243+08:00 DEBUG rust_tdlib::client::worker - checking encryption key
2022-12-21T13:35:23.353673320+08:00 DEBUG rust_tdlib::client::worker - encryption key check done
2022-12-21T13:35:23.353716306+08:00 DEBUG rust_tdlib::client::worker - state changes handled properly
2022-12-21T13:35:23.353737978+08:00 DEBUG rust_tdlib::client::worker - received new auth state: UpdateAuthorizationState { extra: None, client_id: Some(1), authorization_state: Ready(AuthorizationStateReady { extra: None, client_id: None }) }
2022-12-21T13:35:23.353759905+08:00 DEBUG rust_tdlib::client::worker - handling new auth state: Ready(AuthorizationStateReady { extra: None, client_id: None })
2022-12-21T13:35:23.353776167+08:00 DEBUG rust_tdlib::client::worker - ready state received, send signal
2022-12-21T13:35:23.353797568+08:00 DEBUG rust_tdlib::client::worker - state changes handled properly
2022-12-21T13:35:24.321004889+08:00 INFO tg_bot_tdlib - me: User { extra: Some("2db0e39b-9391-463e-9cc9-5e1ab361b939"), client_id: Some(1), id: 5000443693, first_name: "Eric", last_name: "Deng", username: "", phone_number: "my phone number", status: Offline(UserStatusOffline { extra: None, client_id: None, was_online: 1671598776 }), profile_photo: None, is_contact: false, is_mutual_contact: false, is_verified: false, is_support: false, restriction_reason: "", is_scam: false, is_fake: false, have_access: true, type_: Regular(UserTypeRegular { extra: None, client_id: None }), language_code: "" }
2022-12-21T13:35:24.321234664+08:00 INFO tg_bot_tdlib - updates handler received Option(UpdateOption { extra: None, client_id: Some(1), name: "version", value: String(OptionValueString { extra: None, client_id: None, value: "1.8.0" }) })
2022-12-21T13:35:24.321293141+08:00 INFO tg_bot_tdlib - updates handler received Option(UpdateOption { extra: None, client_id: Some(1), name: "unix_time", value: Integer(OptionValueInteger { extra: None, client_id: None, value: 1671600919 }) })
2022-12-21T13:35:24.321373277+08:00 INFO tg_bot_tdlib - updates handler received Option(UpdateOption { extra: None, client_id: Some(1), name: "can_archive_and_mute_new_chats_from_unknown_users", value: Boolean(OptionValueBoolean { extra: None, client_id: None, value: true }) })
2022-12-21T13:35:24.321469929+08:00 INFO tg_bot_tdlib - updates handler received Option(UpdateOption { extra: None, client_id: Some(1), name: "t_me_url", value: String(OptionValueString { extra: None, client_id: None, value: "https://t.me/" }) })
2022-12-21T13:35:24.321563653+08:00 INFO tg_bot_tdlib - updates handler received Option(UpdateOption { extra: None, client_id: Some(1), name: "expect_blocking", value: Boolean(OptionValueBoolean { extra: None, client_id: None, value: false }) })
2022-12-21T13:35:24.321660296+08:00 INFO tg_bot_tdlib - updates handler received Option(UpdateOption { extra: None, client_id: Some(1), name: "replies_bot_chat_id", value: Integer(OptionValueInteger { extra: None, client_id: None, value: 708513 }) })
2022-12-21T13:35:24.321753740+08:00 INFO tg_bot_tdlib - updates handler received Option(UpdateOption { extra: None, client_id: Some(1), name: "forwarded_message_count_max", value: Integer(OptionValueInteger { extra: None, client_id: None, value: 100 }) })
2022-12-21T13:35:24.321845712+08:00 INFO tg_bot_tdlib - updates handler received Option(UpdateOption { extra: None, client_id: Some(1), name: "test_mode", value: Boolean(OptionValueBoolean { extra: None, client_id: None, value: true }) })
2022-12-21T13:35:24.321891595+08:00 INFO tg_bot_tdlib - updates handler received Option(UpdateOption { extra: None, client_id: Some(1), name: "pinned_chat_count_max", value: Integer(OptionValueInteger { extra: None, client_id: None, value: 4 }) })
2022-12-21T13:35:24.321915345+08:00 INFO tg_bot_tdlib - updates handler received Option(UpdateOption { extra: None, client_id: Some(1), name: "basic_group_size_max", value: Integer(OptionValueInteger { extra: None, client_id: None, value: 50 }) })
2022-12-21T13:35:24.321936835+08:00 INFO tg_bot_tdlib - updates handler received Option(UpdateOption { extra: None, client_id: Some(1), name: "message_caption_length_max", value: Integer(OptionValueInteger { extra: None, client_id: None, value: 1024 }) })
2022-12-21T13:35:24.321957509+08:00 INFO tg_bot_tdlib - updates handler received Option(UpdateOption { extra: None, client_id: Some(1), name: "message_text_length_max", value: Integer(OptionValueInteger { extra: None, client_id: None, value: 4096 }) })
2022-12-21T13:35:24.321978230+08:00 INFO tg_bot_tdlib - updates handler received Option(UpdateOption { extra: None, client_id: Some(1), name: "call_packet_timeout_ms", value: Integer(OptionValueInteger { extra: None, client_id: None, value: 10000 }) })
2022-12-21T13:35:24.321998622+08:00 INFO tg_bot_tdlib - updates handler received Option(UpdateOption { extra: None, client_id: Some(1), name: "suggested_video_note_length", value: Integer(OptionValueInteger { extra: None, client_id: None, value: 384 }) })
2022-12-21T13:35:24.322019322+08:00 INFO tg_bot_tdlib - updates handler received Option(UpdateOption { extra: None, client_id: Some(1), name: "is_location_visible", value: Boolean(OptionValueBoolean { extra: None, client_id: None, value: false }) })
2022-12-21T13:35:24.322039309+08:00 INFO tg_bot_tdlib - updates handler received Option(UpdateOption { extra: None, client_id: Some(1), name: "suggested_video_note_video_bitrate", value: Integer(OptionValueInteger { extra: None, client_id: None, value: 1000 }) })
2022-12-21T13:35:24.322060258+08:00 INFO tg_bot_tdlib - updates handler received Option(UpdateOption { extra: None, client_id: Some(1), name: "channel_bot_user_id", value: Integer(OptionValueInteger { extra: None, client_id: None, value: 936174 }) })
2022-12-21T13:35:24.322079943+08:00 INFO tg_bot_tdlib - updates handler received Option(UpdateOption { extra: None, client_id: Some(1), name: "telegram_service_notifications_chat_id", value: Integer(OptionValueInteger { extra: None, client_id: None, value: 777000 }) })
2022-12-21T13:35:24.322100050+08:00 INFO tg_bot_tdlib - updates handler received Option(UpdateOption { extra: None, client_id: Some(1), name: "animation_search_bot_username", value: String(OptionValueString { extra: None, client_id: None, value: "contextbot" }) })
2022-12-21T13:35:24.322121864+08:00 INFO tg_bot_tdlib - updates handler received Option(UpdateOption { extra: None, client_id: Some(1), name: "my_id", value: Integer(OptionValueInteger { extra: None, client_id: None, value: 5000443693 }) })
2022-12-21T13:35:24.322151182+08:00 INFO tg_bot_tdlib - updates handler received Option(UpdateOption { extra: None, client_id: Some(1), name: "group_anonymous_bot_user_id", value: Integer(OptionValueInteger { extra: None, client_id: None, value: 552888 }) })
2022-12-21T13:35:24.322170897+08:00 INFO tg_bot_tdlib - updates handler received Option(UpdateOption { extra: None, client_id: Some(1), name: "archive_and_mute_new_chats_from_unknown_users", value: Boolean(OptionValueBoolean { extra: None, client_id: None, value: false }) })
2022-12-21T13:35:24.322240826+08:00 INFO tg_bot_tdlib - updates handler received Option(UpdateOption { extra: None, client_id: Some(1), name: "ignore_sensitive_content_restrictions", value: Boolean(OptionValueBoolean { extra: None, client_id: None, value: false }) })
2022-12-21T13:35:24.322285874+08:00 INFO tg_bot_tdlib - updates handler received Option(UpdateOption { extra: None, client_id: Some(1), name: "suggested_video_note_audio_bitrate", value: Integer(OptionValueInteger { extra: None, client_id: None, value: 64 }) })
2022-12-21T13:35:24.322311491+08:00 INFO tg_bot_tdlib - updates handler received Option(UpdateOption { extra: None, client_id: Some(1), name: "utc_time_offset", value: Integer(OptionValueInteger { extra: None, client_id: None, value: 28800 }) })
2022-12-21T13:35:24.322378927+08:00 INFO tg_bot_tdlib - updates handler received Option(UpdateOption { extra: None, client_id: Some(1), name: "call_connect_timeout_ms", value: Integer(OptionValueInteger { extra: None, client_id: None, value: 30000 }) })
2022-12-21T13:35:24.322470481+08:00 INFO tg_bot_tdlib - updates handler received Option(UpdateOption { extra: None, client_id: Some(1), name: "authorization_date", value: Integer(OptionValueInteger { extra: None, client_id: None, value: 1671598476 }) })
2022-12-21T13:35:24.322561236+08:00 INFO tg_bot_tdlib - updates handler received Option(UpdateOption { extra: None, client_id: Some(1), name: "can_ignore_sensitive_content_restrictions", value: Boolean(OptionValueBoolean { extra: None, client_id: None, value: true }) })
2022-12-21T13:35:24.322608574+08:00 INFO tg_bot_tdlib - updates handler received Option(UpdateOption { extra: None, client_id: Some(1), name: "venue_search_bot_username", value: String(OptionValueString { extra: None, client_id: None, value: "foursquarebot" }) })
2022-12-21T13:35:24.322631994+08:00 INFO tg_bot_tdlib - updates handler received Option(UpdateOption { extra: None, client_id: Some(1), name: "calls_enabled", value: Boolean(OptionValueBoolean { extra: None, client_id: None, value: true }) })
2022-12-21T13:35:24.322651783+08:00 INFO tg_bot_tdlib - updates handler received Option(UpdateOption { extra: None, client_id: Some(1), name: "photo_search_bot_username", value: String(OptionValueString { extra: None, client_id: None, value: "imagebot" }) })
2022-12-21T13:35:24.322672983+08:00 INFO tg_bot_tdlib - updates handler received Option(UpdateOption { extra: None, client_id: Some(1), name: "supergroup_size_max", value: Integer(OptionValueInteger { extra: None, client_id: None, value: 500 }) })
2022-12-21T13:35:24.322695689+08:00 INFO tg_bot_tdlib - updates handler received Option(UpdateOption { extra: None, client_id: Some(1), name: "favorite_stickers_limit", value: Integer(OptionValueInteger { extra: None, client_id: None, value: 5 }) })
2022-12-21T13:35:24.322719931+08:00 INFO tg_bot_tdlib - updates handler received Option(UpdateOption { extra: None, client_id: Some(1), name: "pinned_archived_chat_count_max", value: Integer(OptionValueInteger { extra: None, client_id: None, value: 3 }) })
2022-12-21T13:35:24.322799810+08:00 INFO tg_bot_tdlib - updates handler received HavePendingNotifications(UpdateHavePendingNotifications { extra: None, client_id: Some(1), have_delayed_notifications: false, have_unreceived_notifications: true })
2022-12-21T13:35:24.322884396+08:00 INFO tg_bot_tdlib - updates handler received DiceEmojis(UpdateDiceEmojis { extra: None, client_id: Some(1), emojis: ["๐ŸŽฒ", "๐ŸŽฏ", "๐Ÿ€", "โšฝ", "โšฝ\u{fe0f}", "๐ŸŽฐ", "๐ŸŽณ"] })
2022-12-21T13:35:24.322995353+08:00 INFO tg_bot_tdlib - updates handler received AnimationSearchParameters(UpdateAnimationSearchParameters { extra: None, client_id: Some(1), provider: "tenor", emojis: ["๐Ÿ‘", "๐Ÿ˜˜", "๐Ÿ˜", "๐Ÿ˜ก", "๐Ÿฅณ", "๐Ÿ˜‚", "๐Ÿ˜ฎ", "๐Ÿ™„", "๐Ÿ˜Ž", "๐Ÿ‘Ž"] })
2022-12-21T13:35:24.323104497+08:00 INFO tg_bot_tdlib - updates handler received SelectedBackground(UpdateSelectedBackground { extra: None, client_id: Some(1), for_dark_theme: false, background: None })
2022-12-21T13:35:24.323146108+08:00 INFO tg_bot_tdlib - updates handler received SelectedBackground(UpdateSelectedBackground { extra: None, client_id: Some(1), for_dark_theme: true, background: None })
2022-12-21T13:35:24.323165035+08:00 INFO tg_bot_tdlib - updates handler received ChatThemes(UpdateChatThemes { extra: None, client_id: Some(1), chat_themes: [ChatTheme { extra: None, client_id: None, name: "๐Ÿฅ", light_settings: ThemeSettings { extra: None, client_id: None, accent_color: 2732145, background: Some(Background { extra: None, client_id: None, id: 5431458738223448065, is_default: false, is_dark: true, name: "rcbvm_JqYEsBAAAAuCg0h7HhIxQ", document: Some(Document { extra: None, client_id: None, file_name: "pattern.tgv", mime_type: "application/x-tgwallpattern", minithumbnail: None, thumbnail: Some(Thumbnail { extra: None, client_id: None, format: Png(ThumbnailFormatPng { extra: None, client_id: None }), width: 155, height: 320, file: File { extra: None, client_id: None, id: 1, size: 20067, expected_size: 20067, local: LocalFile { extra: None, client_id: None, path: "", can_be_downloaded: true, can_be_deleted: false, is_downloading_active: false, is_downloading_completed: false, download_offset: 0, downloaded_prefix_size: 0, downloaded_size: 0 }, remote: RemoteFile { extra: None, client_id: None, id: "AAMCAQADFQABY6KZaaC_jofRkdKs5ZZWNbMdDK0AAgEAAwV0YEv7tdtLMdZqwgEAB20AAyME", unique_id: "AQADAQADBXRgS3I", is_uploading_active: false, is_uploading_completed: true, uploaded_size: 20067 } } }), document: File { extra: None, client_id: None, id: 2, size: 51194, expected_size: 51194, local: LocalFile { extra: None, client_id: None, path: "", can_be_downloaded: true, can_be_deleted: false, is_downloading_active: false, is_downloading_completed: false, download_offset: 0, downloaded_prefix_size: 0, downloaded_size: 0 }, remote: RemoteFile { extra: None, client_id: None, id: "EAACAgEAAxUAAWOimWmgv46H0ZHSrOWWVjWzHQytAAIBAAMFdGBL-7XbSzHWasIjBA", unique_id: "AgADAQADBXRgSw", is_uploading_active: false, is_uploading_completed: true, uploaded_size: 51194 } } }), type_: Pattern(BackgroundTypePattern { extra: None, client_id: None, fill: FreeformGradient(BackgroundFillFreeformGradient { extra: None, client_id: None, colors: [7977128, 12834723, 14013845, 10866066] }), intensity: 42, is_inverted: false, is_moving: false }) }), outgoing_message_fill: Gradient(BackgroundFillGradient { extra: None, client_id: None, top_color: 15791825, bottom_color: 15136213, rotation_angle: 0 }), animate_outgoing_message_fill: false, outgoing_message_accent_color: 5025892 }, dark_settings: ThemeSettings { extra: None, client_id: None, accent_color: 5674079, background: Some(Background { extra: None, client_id: None, id: 5431458738223448065, is_default: false, is_dark: true, name: "rcbvm_JqYEsBAAAAuCg0h7HhIxQ", document: Some(Document { extra: None, client_id: None, file_name: "pattern.tgv", mime_type: "application/x-tgwallpattern", minithumbnail: None, thumbnail: Some(Thumbnail { extra: None, client_id: None, format: Png(ThumbnailFormatPng { extra: None, client_id: None }), width: 155, height: 320, file: File { extra: None, client_id: None, id: 1, size: 20067, expected_size: 20067, local: LocalFile { extra: None, client_id: None, path: "", can_be_downloaded: true, can_be_deleted: false, is_downloading_active: false, is_downloading_completed: false, download_offset: 0, downloaded_prefix_size: 0, downloaded_size: 0 }, remote: RemoteFile { extra: None, client_id: None, id: "AAMCAQADFQABY6KZaaC_jofRkdKs5ZZWNbMdDK0AAgEAAwV0YEv7tdtLMdZqwgEAB20AAyME", unique_id: "AQADAQADBXRgS3I", is_uploading_active: false, is_uploading_completed: true, uploaded_size: 20067 } } }), document: File { extra: None, client_id: None, id: 2, size: 51194, expected_size: 51194, local: LocalFile { extra: None, client_id: None, path: "", can_be_downloaded: true, can_be_deleted: false, is_downloading_active: false, is_downloading_completed: false, download_offset: 0, downloaded_prefix_size: 0, downloaded_size: 0 }, remote: RemoteFile { extra: None, client_id: None, id: "EAACAgEAAxUAAWOimWmgv46H0ZHSrOWWVjWzHQytAAIBAAMFdGBL-7XbSzHWasIjBA", unique_id: "AgADAQADBXRgSw", is_uploading_active: false, is_uploading_completed: true, uploaded_size: 51194 } } }), type_: Pattern(BackgroundTypePattern { extra: None, client_id: None, fill: FreeformGradient(BackgroundFillFreeformGradient { extra: None, client_id: None, colors: [2310725, 7174476, 2047025, 5541474] }), intensity: 58, is_inverted: true, is_moving: false }) }), outgoing_message_fill: Gradient(BackgroundFillGradient { extra: None, client_id: None, top_color: 2128220, bottom_color: 6192443, rotation_angle: 0 }), animate_outgoing_message_fill: false, outgoing_message_accent_color: 5674079 } }, ChatTheme { extra: None, client_id: None, name: "โ›„", light_settings: ThemeSettings { extra: None, client_id: None, accent_color: 3317463, background: Some(Background { extra: None, client_id: None, id: 5431752389432442881, is_default: false, is_dark: true, name: "ipMwAwV2YUsBAAAAWaE1u0St_fM", document: Some(Document { extra: None, client_id: None, file_name: "pattern.tgv", mime_type: "application/x-tgwallpattern", minithumbnail: None, thumbnail: Some(Thumbnail { extra: None, client_id: None, format: Png(ThumbnailFormatPng { extra: None, client_id: None }), width: 148, height: 320, file: File { extra: None, client_id: None, id: 3, size: 27697, expected_size: 27697, local: LocalFile { extra: None, client_id: None, path: "", can_be_downloaded: true, can_be_deleted: false, is_downloading_active: false, is_downloading_completed: false, download_offset: 0, downloaded_prefix_size: 0, downloaded_size: 0 }, remote: RemoteFile { extra: None, client_id: None, id: "AAMCAQADFQABY6KZaeoc6_ueQwAB2Tn-7kNfOFrCAAIBAAOlYGFLIaUZQsNMalkBAAdtAAMjBA", unique_id: "AQADAQADpWBhS3I", is_uploading_active: false, is_uploading_completed: true, uploaded_size: 27697 } } }), document: File { extra: None, client_id: None, id: 4, size: 100992, expected_size: 100992, local: LocalFile { extra: None, client_id: None, path: "", can_be_downloaded: true, can_be_deleted: false, is_downloading_active: false, is_downloading_completed: false, download_offset: 0, downloaded_prefix_size: 0, downloaded_size: 0 }, remote: RemoteFile { extra: None, client_id: None, id: "EAACAgEAAxUAAWOimWnqHOv7nkMAAdk5_u5DXzhawgACAQADpWBhSyGlGULDTGpZIwQ", unique_id: "AgADAQADpWBhSw", is_uploading_active: false, is_uploading_completed: true, uploaded_size: 100992 } } }), type_: Pattern(BackgroundTypePattern { extra: None, client_id: None, fill: FreeformGradient(BackgroundFillFreeformGradient { extra: None, client_id: None, colors: [8497648, 10343668, 11460562, 12304367] }), intensity: 41, is_inverted: false, is_moving: false }) }), outgoing_message_fill: Gradient(BackgroundFillGradient { extra: None, client_id: None, top_color: 15333371, bottom_color: 15727612, rotation_angle: 0 }), animate_outgoing_message_fill: false, outgoing_message_accent_color: 4367839 }, dark_settings: ThemeSettings { extra: None, client_id: None, accent_color: 5019631, background: Some(Background { extra: None, client_id: None, id: 5431752389432442881, is_default: false, is_dark: true, name: "ipMwAwV2YUsBAAAAWaE1u0St_fM", document: Some(Document { extra: None, client_id: None, file_name: "pattern.tgv", mime_type: "application/x-tgwallpattern", minithumbnail: None, thumbnail: Some(Thumbnail { extra: None, client_id: None, format: Png(ThumbnailFormatPng { extra: None, client_id: None }), width: 148, height: 320, file: File { extra: None, client_id: None, id: 3, size: 27697, expected_size: 27697, local: LocalFile { extra: None, client_id: None, path: "", can_be_downloaded: true, can_be_deleted: false, is_downloading_active: false, is_downloading_completed: false, download_offset: 0, downloaded_prefix_size: 0, downloaded_size: 0 }, remote: RemoteFile { extra: None, client_id: None, id: "AAMCAQADFQABY6KZaeoc6_ueQwAB2Tn-7kNfOFrCAAIBAAOlYGFLIaUZQsNMalkBAAdtAAMjBA", unique_id: "AQADAQADpWBhS3I", is_uploading_active: false, is_uploading_completed: true, uploaded_size: 27697 } } }), document: File { extra: None, client_id: None, id: 4, size: 100992, expected_size: 100992, local: LocalFile { extra: None, client_id: None, path: "", can_be_downloaded: true, can_be_deleted: false, is_downloading_active: false, is_downloading_completed: false, download_offset: 0, downloaded_prefix_size: 0, downloaded_size: 0 }, remote: RemoteFile { extra: None, client_id: None, id: "EAACAgEAAxUAAWOimWnqHOv7nkMAAdk5_u5DXzhawgACAQADpWBhSyGlGULDTGpZIwQ", unique_id: "AgADAQADpWBhSw", is_uploading_active: false, is_uploading_completed: true, uploaded_size: 100992 } } }), type_: Pattern(BackgroundTypePattern { extra: None, client_id: None, fill: FreeformGradient(BackgroundFillFreeformGradient { extra: None, client_id: None, colors: [5274253, 2109771, 2122357, 1582382] }), intensity: 57, is_inverted: true, is_moving: false }) }), outgoing_message_fill: Gradient(BackgroundFillGradient { extra: None, client_id: None, top_color: 3305130, bottom_color: 2261394, rotation_angle: 0 }), animate_outgoing_message_fill: false, outgoing_message_accent_color: 5019631 } }, ChatTheme { extra: None, client_id: None, name: "๐Ÿ’Ž", light_settings: ThemeSettings { extra: None, client_id: None, accent_color: 10776791, background: Some(Background { extra: None, client_id: None, id: 5431672511630671873, is_default: false, is_dark: true, name: "fNEcKF8tYUsBAAAACZfx-Ulx_dg", document: Some(Document { extra: None, client_id: None, file_name: "pattern.tgv", mime_type: "application/x-tgwallpattern", minithumbnail: None, thumbnail: Some(Thumbnail { extra: None, client_id: None, format: Png(ThumbnailFormatPng { extra: None, client_id: None }), width: 155, height: 320, file: File { extra: None, client_id: None, id: 5, size: 21763, expected_size: 21763, local: LocalFile { extra: None, client_id: None, path: "", can_be_downloaded: true, can_be_deleted: false, is_downloading_active: false, is_downloading_completed: false, download_offset: 0, downloaded_prefix_size: 0, downloaded_size: 0 }, remote: RemoteFile { extra: None, client_id: None, id: "AAMCAQADFQABY6KZaTS-6lgCh6CD9xKaG0427g4AAgEAAzbGYUsiqF0lsrY5VwEAB20AAyME", unique_id: "AQADAQADNsZhS3I", is_uploading_active: false, is_uploading_completed: true, uploaded_size: 21763 } } }), document: File { extra: None, client_id: None, id: 6, size: 93075, expected_size: 93075, local: LocalFile { extra: None, client_id: None, path: "", can_be_downloaded: true, can_be_deleted: false, is_downloading_active: false, is_downloading_completed: false, download_offset: 0, downloaded_prefix_size: 0, downloaded_size: 0 }, remote: RemoteFile { extra: None, client_id: None, id: "EAACAgEAAxUAAWOimWk0vupYAoegg_cSmhtONu4OAAIBAAM2xmFLIqhdJbK2OVcjBA", unique_id: "AgADAQADNsZhSw", is_uploading_active: false, is_uploading_completed: true, uploaded_size: 93075 } } }), type_: Pattern(BackgroundTypePattern { extra: None, client_id: None, fill: FreeformGradient(BackgroundFillFreeformGradient { extra: None, client_id: None, colors: [9944811, 11659754, 13021679, 15710172] }), intensity: 50, is_inverted: false, is_moving: false }) }), outgoing_message_fill: Solid(BackgroundFillSolid { extra: None, client_id: None, color: 15136767 }), animate_outgoing_message_fill: false, outgoing_message_accent_color: 5550056 }, dark_settings: ThemeSettings { extra: None, client_id: None, accent_color: 8806573, background: Some(Background { extra: None, client_id: None, id: 5431672511630671873, is_default: false, is_dark: true, name: "fNEcKF8tYUsBAAAACZfx-Ulx_dg", document: Some(Document { extra: None, client_id: None, file_name: "pattern.tgv", mime_type: "application/x-tgwallpattern", minithumbnail: None, thumbnail: Some(Thumbnail { extra: None, client_id: None, format: Png(ThumbnailFormatPng { extra: None, client_id: None }), width: 155, height: 320, file: File { extra: None, client_id: None, id: 5, size: 21763, expected_size: 21763, local: LocalFile { extra: None, client_id: None, path: "", can_be_downloaded: true, can_be_deleted: false, is_downloading_active: false, is_downloading_completed: false, download_offset: 0, downloaded_prefix_size: 0, downloaded_size: 0 }, remote: RemoteFile { extra: None, client_id: None, id: "AAMCAQADFQABY6KZaTS-6lgCh6CD9xKaG0427g4AAgEAAzbGYUsiqF0lsrY5VwEAB20AAyME", unique_id: "AQADAQADNsZhS3I", is_uploading_active: false, is_uploading_completed: true, uploaded_size: 21763 } } }), document: File { extra: None, client_id: None, id: 6, size: 93075, expected_size: 93075, local: LocalFile { extra: None, client_id: None, path: "", can_be_downloaded: true, can_be_deleted: false, is_downloading_active: false, is_downloading_completed: false, download_offset: 0, downloaded_prefix_size: 0, downloaded_size: 0 }, remote: RemoteFile { extra: None, client_id: None, id: "EAACAgEAAxUAAWOimWk0vupYAoegg_cSmhtONu4OAAIBAAM2xmFLIqhdJbK2OVcjBA", unique_id: "AgADAQADNsZhSw", is_uploading_active: false, is_uploading_completed: true, uploaded_size: 93075 } } }), type_: Pattern(BackgroundTypePattern { extra: None, client_id: None, fill: FreeformGradient(BackgroundFillFreeformGradient { extra: None, client_id: None, colors: [2499660, 4286356, 1713474, 7295121] }), intensity: 58, is_inverted: true, is_moving: false }) }), outgoing_message_fill: Gradient(BackgroundFillGradient { extra: None, client_id: None, top_color: 4869798, bottom_color: 2456746, rotation_angle: 0 }), animate_outgoing_message_fill: false, outgoing_message_accent_color: 8806573 } }, ChatTheme { extra: None, client_id: None, name: "๐Ÿ‘จ\u{200d}๐Ÿซ", light_settings: ThemeSettings { extra: None, client_id: None, accent_color: 2143654, background: Some(Background { extra: None, client_id: None, id: 5431450947152773121, is_default: false, is_dark: true, name: "uw9kWdxjYEsBAAAAsMQaJOuojNk", document: Some(Document { extra: None, client_id: None, file_name: "pattern.tgv", mime_type: "application/x-tgwallpattern", minithumbnail: None, thumbnail: Some(Thumbnail { extra: None, client_id: None, format: Png(ThumbnailFormatPng { extra: None, client_id: None }), width: 148, height: 320, file: File { extra: None, client_id: None, id: 7, size: 22921, expected_size: 22921, local: LocalFile { extra: None, client_id: None, path: "", can_be_downloaded: true, can_be_deleted: false, is_downloading_active: false, is_downloading_completed: false, download_offset: 0, downloaded_prefix_size: 0, downloaded_size: 0 }, remote: RemoteFile { extra: None, client_id: None, id: "AAMCAQADFQABY6KZaU9yDMWXj4MQDNy2ZPxI03UAAgEAAzgJYEtcJRMpswOUvAEAB20AAyME", unique_id: "AQADAQADOAlgS3I", is_uploading_active: false, is_uploading_completed: true, uploaded_size: 22921 } } }), document: File { extra: None, client_id: None, id: 8, size: 312605, expected_size: 312605, local: LocalFile { extra: None, client_id: None, path: "", can_be_downloaded: true, can_be_deleted: false, is_downloading_active: false, is_downloading_completed: false, download_offset: 0, downloaded_prefix_size: 0, downloaded_size: 0 }, remote: RemoteFile { extra: None, client_id: None, id: "EAACAgEAAxUAAWOimWlPcgzFl4-DEAzctmT8SNN1AAIBAAM4CWBLXCUTKbMDlLwjBA", unique_id: "AgADAQADOAlgSw", is_uploading_active: false, is_uploading_completed: true, uploaded_size: 312605 } } }), type_: Pattern(BackgroundTypePattern { extra: None, client_id: None, fill: FreeformGradient(BackgroundFillFreeformGradient { extra: None, client_id: None, colors: [13755285, 9556684, 7780582, 9557658] }), intensity: 50, is_inverted: false, is_moving: false }) }), outgoing_message_fill: Solid(BackgroundFillSolid { extra: None, client_id: None, color: 16055267 }), animate_outgoing_message_fill: false, outgoing_message_accent_color: 3452533 }, dark_settings: ThemeSettings { extra: None, client_id: None, accent_color: 5083299, background: Some(Background { extra: None, client_id: None, id: 5431450947152773121, is_default: false, is_dark: true, name: "uw9kWdxjYEsBAAAAsMQaJOuojNk", document: Some(Document { extra: None, client_id: None, file_name: "pattern.tgv", mime_type: "application/x-tgwallpattern", minithumbnail: None, thumbnail: Some(Thumbnail { extra: None, client_id: None, format: Png(ThumbnailFormatPng { extra: None, client_id: None }), width: 148, height: 320, file: File { extra: None, client_id: None, id: 7, size: 22921, expected_size: 22921, local: LocalFile { extra: None, client_id: None, path: "", can_be_downloaded: true, can_be_deleted: false, is_downloading_active: false, is_downloading_completed: false, download_offset: 0, downloaded_prefix_size: 0, downloaded_size: 0 }, remote: RemoteFile { extra: None, client_id: None, id: "AAMCAQADFQABY6KZaU9yDMWXj4MQDNy2ZPxI03UAAgEAAzgJYEtcJRMpswOUvAEAB20AAyME", unique_id: "AQADAQADOAlgS3I", is_uploading_active: false, is_uploading_completed: true, uploaded_size: 22921 } } }), document: File { extra: None, client_id: None, id: 8, size: 312605, expected_size: 312605, local: LocalFile { extra: None, client_id: None, path: "", can_be_downloaded: true, can_be_deleted: false, is_downloading_active: false, is_downloading_completed: false, download_offset: 0, downloaded_prefix_size: 0, downloaded_size: 0 }, remote: RemoteFile { extra: None, client_id: None, id: "EAACAgEAAxUAAWOimWlPcgzFl4-DEAzctmT8SNN1AAIBAAM4CWBLXCUTKbMDlLwjBA", unique_id: "AgADAQADOAlgSw", is_uploading_active: false, is_uploading_completed: true, uploaded_size: 312605 } } }), type_: Pattern(BackgroundTypePattern { extra: None, client_id: None, fill: FreeformGradient(BackgroundFillFreeformGradient { extra: None, client_id: None, colors: [4223869, 1916771, 5797203, 1656130] }), intensity: 61, is_inverted: true, is_moving: false }) }), outgoing_message_fill: Gradient(BackgroundFillGradient { extra: None, client_id: None, top_color: 3697773, bottom_color: 5732947, rotation_angle: 0 }), animate_outgoing_message_fill: false, outgoing_message_accent_color: 5083299 } }, ChatTheme { extra: None, client_id: None, name: "๐ŸŒท", light_settings: ThemeSettings { extra: None, client_id: None, accent_color: 13658513, background: Some(Background { extra: None, client_id: None, id: 5431404655995256833, is_default: false, is_dark: true, name: "fuvAdcI5YEsBAAAA4sz-aqjSKXU", document: Some(Document { extra: None, client_id: None, file_name: "pattern.tgv", mime_type: "application/x-tgwallpattern", minithumbnail: None, thumbnail: Some(Thumbnail { extra: None, client_id: None, format: Png(ThumbnailFormatPng { extra: None, client_id: None }), width: 155, height: 320, file: File { extra: None, client_id: None, id: 9, size: 23099, expected_size: 23099, local: LocalFile { extra: None, client_id: None, path: "", can_be_downloaded: true, can_be_deleted: false, is_downloading_active: false, is_downloading_completed: false, download_offset: 0, downloaded_prefix_size: 0, downloaded_size: 0 }, remote: RemoteFile { extra: None, client_id: None, id: "AAMCAQADFQABY6KZaVmU_R_9qfPVCCZ88OSJ4RwAAgEAAzXBYUsXG-K8WjPEwAEAB20AAyME", unique_id: "AQADAQADNcFhS3I", is_uploading_active: false, is_uploading_completed: true, uploaded_size: 23099 } } }), document: File { extra: None, client_id: None, id: 10, size: 51705, expected_size: 51705, local: LocalFile { extra: None, client_id: None, path: "", can_be_downloaded: true, can_be_deleted: false, is_downloading_active: false, is_downloading_completed: false, download_offset: 0, downloaded_prefix_size: 0, downloaded_size: 0 }, remote: RemoteFile { extra: None, client_id: None, id: "EAACAgEAAxUAAWOimWlZlP0f_anz1QgmfPDkieEcAAIBAAM1wWFLFxvivFozxMAjBA", unique_id: "AgADAQADNcFhSw", is_uploading_active: false, is_uploading_completed: true, uploaded_size: 51705 } } }), type_: Pattern(BackgroundTypePattern { extra: None, client_id: None, fill: FreeformGradient(BackgroundFillFreeformGradient { extra: None, client_id: None, colors: [15511182, 15254915, 15442113, 13087211] }), intensity: 50, is_inverted: false, is_moving: false }) }), outgoing_message_fill: Solid(BackgroundFillSolid { extra: None, client_id: None, color: 16773603 }), animate_outgoing_message_fill: false, outgoing_message_accent_color: 13933382 }, dark_settings: ThemeSettings { extra: None, client_id: None, accent_color: 12411780, background: Some(Background { extra: None, client_id: None, id: 5431404655995256833, is_default: false, is_dark: true, name: "fuvAdcI5YEsBAAAA4sz-aqjSKXU", document: Some(Document { extra: None, client_id: None, file_name: "pattern.tgv", mime_type: "application/x-tgwallpattern", minithumbnail: None, thumbnail: Some(Thumbnail { extra: None, client_id: None, format: Png(ThumbnailFormatPng { extra: None, client_id: None }), width: 155, height: 320, file: File { extra: None, client_id: None, id: 9, size: 23099, expected_size: 23099, local: LocalFile { extra: None, client_id: None, path: "", can_be_downloaded: true, can_be_deleted: false, is_downloading_active: false, is_downloading_completed: false, download_offset: 0, downloaded_prefix_size: 0, downloaded_size: 0 }, remote: RemoteFile { extra: None, client_id: None, id: "AAMCAQADFQABY6KZaVmU_R_9qfPVCCZ88OSJ4RwAAgEAAzXBYUsXG-K8WjPEwAEAB20AAyME", unique_id: "AQADAQADNcFhS3I", is_uploading_active: false, is_uploading_completed: true, uploaded_size: 23099 } } }), document: File { extra: None, client_id: None, id: 10, size: 51705, expected_size: 51705, local: LocalFile { extra: None, client_id: None, path: "", can_be_downloaded: true, can_be_deleted: false, is_downloading_active: false, is_downloading_completed: false, download_offset: 0, downloaded_prefix_size: 0, downloaded_size: 0 }, remote: RemoteFile { extra: None, client_id: None, id: "EAACAgEAAxUAAWOimWlZlP0f_anz1QgmfPDkieEcAAIBAAM1wWFLFxvivFozxMAjBA", unique_id: "AgADAQADNcFhSw", is_uploading_active: false, is_uploading_completed: true, uploaded_size: 51705 } } }), type_: Pattern(BackgroundTypePattern { extra: None, client_id: None, fill: FreeformGradient(BackgroundFillFreeformGradient { extra: None, client_id: None, colors: [8085921, 5254203, 10644559, 6042922] }), intensity: 58, is_inverted: true, is_moving: false }) }), outgoing_message_fill: Gradient(BackgroundFillGradient { extra: None, client_id: None, top_color: 10044247, bottom_color: 12151869, rotation_angle: 0 }), animate_outgoing_message_fill: false, outgoing_message_accent_color: 12411780 } }, ChatTheme { extra: None, client_id: None, name: "๐Ÿ’œ", light_settings: ThemeSettings { extra: None, client_id: None, accent_color: 10776791, background: Some(Background { extra: None, client_id: None, id: 5431459257914490881, is_default: false, is_dark: true, name: "E1ZORmtrYEsBAAAAlnN50s9xVI8", document: Some(Document { extra: None, client_id: None, file_name: "pattern.tgv", mime_type: "application/x-tgwallpattern", minithumbnail: None, thumbnail: Some(Thumbnail { extra: None, client_id: None, format: Png(ThumbnailFormatPng { extra: None, client_id: None }), width: 155, height: 320, file: File { extra: None, client_id: None, id: 11, size: 21485, expected_size: 21485, local: LocalFile { extra: None, client_id: None, path: "", can_be_downloaded: true, can_be_deleted: false, is_downloading_active: false, is_downloading_completed: false, download_offset: 0, downloaded_prefix_size: 0, downloaded_size: 0 }, remote: RemoteFile { extra: None, client_id: None, id: "AAMCAQADFQABY6KZaYmE2nJkuJFvLOxDFILzKEMAAgEAA2C5YUu2wJRKQ_3i4AEAB20AAyME", unique_id: "AQADAQADYLlhS3I", is_uploading_active: false, is_uploading_completed: true, uploaded_size: 21485 } } }), document: File { extra: None, client_id: None, id: 12, size: 64363, expected_size: 64363, local: LocalFile { extra: None, client_id: None, path: "", can_be_downloaded: true, can_be_deleted: false, is_downloading_active: false, is_downloading_completed: false, download_offset: 0, downloaded_prefix_size: 0, downloaded_size: 0 }, remote: RemoteFile { extra: None, client_id: None, id: "EAACAgEAAxUAAWOimWmJhNpyZLiRbyzsQxSC8yhDAAIBAANguWFLtsCUSkP94uAjBA", unique_id: "AgADAQADYLlhSw", is_uploading_active: false, is_uploading_completed: true, uploaded_size: 64363 } } }), type_: Pattern(BackgroundTypePattern { extra: None, client_id: None, fill: FreeformGradient(BackgroundFillFreeformGradient { extra: None, client_id: None, colors: [15308995, 15312086, 12034025, 15511668] }), intensity: 57, is_inverted: false, is_moving: false }) }), outgoing_message_fill: Solid(BackgroundFillSolid { extra: None, client_id: None, color: 16772078 }), animate_outgoing_message_fill: false, outgoing_message_accent_color: 14248063 }, dark_settings: ThemeSettings { extra: None, client_id: None, accent_color: 8676013, background: Some(Background { extra: None, client_id: None, id: 5431459257914490881, is_default: false, is_dark: true, name: "E1ZORmtrYEsBAAAAlnN50s9xVI8", document: Some(Document { extra: None, client_id: None, file_name: "pattern.tgv", mime_type: "application/x-tgwallpattern", minithumbnail: None, thumbnail: Some(Thumbnail { extra: None, client_id: None, format: Png(ThumbnailFormatPng { extra: None, client_id: None }), width: 155, height: 320, file: File { extra: None, client_id: None, id: 11, size: 21485, expected_size: 21485, local: LocalFile { extra: None, client_id: None, path: "", can_be_downloaded: true, can_be_deleted: false, is_downloading_active: false, is_downloading_completed: false, download_offset: 0, downloaded_prefix_size: 0, downloaded_size: 0 }, remote: RemoteFile { extra: None, client_id: None, id: "AAMCAQADFQABY6KZaYmE2nJkuJFvLOxDFILzKEMAAgEAA2C5YUu2wJRKQ_3i4AEAB20AAyME", unique_id: "AQADAQADYLlhS3I", is_uploading_active: false, is_uploading_completed: true, uploaded_size: 21485 } } }), document: File { extra: None, client_id: None, id: 12, size: 64363, expected_size: 64363, local: LocalFile { extra: None, client_id: None, path: "", can_be_downloaded: true, can_be_deleted: false, is_downloading_active: false, is_downloading_completed: false, download_offset: 0, downloaded_prefix_size: 0, downloaded_size: 0 }, remote: RemoteFile { extra: None, client_id: None, id: "EAACAgEAAxUAAWOimWmJhNpyZLiRbyzsQxSC8yhDAAIBAANguWFLtsCUSkP94uAjBA", unique_id: "AgADAQADYLlhSw", is_uploading_active: false, is_uploading_completed: true, uploaded_size: 64363 } } }), type_: Pattern(BackgroundTypePattern { extra: None, client_id: None, fill: FreeformGradient(BackgroundFillFreeformGradient { extra: None, client_id: None, colors: [7230895, 3616344, 8671107, 5193521] }), intensity: 59, is_inverted: true, is_moving: false }) }), outgoing_message_fill: Gradient(BackgroundFillGradient { extra: None, client_id: None, top_color: 6701434, bottom_color: 10834805, rotation_angle: 0 }), animate_outgoing_message_fill: false, outgoing_message_accent_color: 8676013 } }, ChatTheme { extra: None, client_id: None, name: "๐ŸŽ„", light_settings: ThemeSettings { extra: None, client_id: None, accent_color: 5612377, background: Some(Background { extra: None, client_id: None, id: 5431841540068605953, is_default: false, is_dark: true, name: "KsxJCxrHYUsBAAAAQBkOgMUZRYE", document: Some(Document { extra: None, client_id: None, file_name: "pattern.tgv", mime_type: "application/x-tgwallpattern", minithumbnail: None, thumbnail: Some(Thumbnail { extra: None, client_id: None, format: Png(ThumbnailFormatPng { extra: None, client_id: None }), width: 155, height: 320, file: File { extra: None, client_id: None, id: 13, size: 19643, expected_size: 19643, local: LocalFile { extra: None, client_id: None, path: "", can_be_downloaded: true, can_be_deleted: false, is_downloading_active: false, is_downloading_completed: false, download_offset: 0, downloaded_prefix_size: 0, downloaded_size: 0 }, remote: RemoteFile { extra: None, client_id: None, id: "AAMCAQADFQABY6KZaZy8DhTUSQlsRCnwKM3fh0QAAgEAAz8MYEsv0rntJe3EjQEAB20AAyME", unique_id: "AQADAQADPwxgS3I", is_uploading_active: false, is_uploading_completed: true, uploaded_size: 19643 } } }), document: File { extra: None, client_id: None, id: 14, size: 104932, expected_size: 104932, local: LocalFile { extra: None, client_id: None, path: "", can_be_downloaded: true, can_be_deleted: false, is_downloading_active: false, is_downloading_completed: false, download_offset: 0, downloaded_prefix_size: 0, downloaded_size: 0 }, remote: RemoteFile { extra: None, client_id: None, id: "EAACAgEAAxUAAWOimWmcvA4U1EkJbEQp8CjN34dEAAIBAAM_DGBLL9K57SXtxI0jBA", unique_id: "AgADAQADPwxgSw", is_uploading_active: false, is_uploading_completed: true, uploaded_size: 104932 } } }), type_: Pattern(BackgroundTypePattern { extra: None, client_id: None, fill: FreeformGradient(BackgroundFillFreeformGradient { extra: None, client_id: None, colors: [14721899, 15449723, 14718336, 16308350] }), intensity: 64, is_inverted: false, is_moving: false }) }), outgoing_message_fill: Solid(BackgroundFillSolid { extra: None, client_id: None, color: 16775136 }), animate_outgoing_message_fill: false, outgoing_message_accent_color: 13539151 }, dark_settings: ThemeSettings { extra: None, client_id: None, accent_color: 5866826, background: Some(Background { extra: None, client_id: None, id: 5431841540068605953, is_default: false, is_dark: true, name: "KsxJCxrHYUsBAAAAQBkOgMUZRYE", document: Some(Document { extra: None, client_id: None, file_name: "pattern.tgv", mime_type: "application/x-tgwallpattern", minithumbnail: None, thumbnail: Some(Thumbnail { extra: None, client_id: None, format: Png(ThumbnailFormatPng { extra: None, client_id: None }), width: 155, height: 320, file: File { extra: None, client_id: None, id: 13, size: 19643, expected_size: 19643, local: LocalFile { extra: None, client_id: None, path: "", can_be_downloaded: true, can_be_deleted: false, is_downloading_active: false, is_downloading_completed: false, download_offset: 0, downloaded_prefix_size: 0, downloaded_size: 0 }, remote: RemoteFile { extra: None, client_id: None, id: "AAMCAQADFQABY6KZaZy8DhTUSQlsRCnwKM3fh0QAAgEAAz8MYEsv0rntJe3EjQEAB20AAyME", unique_id: "AQADAQADPwxgS3I", is_uploading_active: false, is_uploading_completed: true, uploaded_size: 19643 } } }), document: File { extra: None, client_id: None, id: 14, size: 104932, expected_size: 104932, local: LocalFile { extra: None, client_id: None, path: "", can_be_downloaded: true, can_be_deleted: false, is_downloading_active: false, is_downloading_completed: false, download_offset: 0, downloaded_prefix_size: 0, downloaded_size: 0 }, remote: RemoteFile { extra: None, client_id: None, id: "EAACAgEAAxUAAWOimWmcvA4U1EkJbEQp8CjN34dEAAIBAAM_DGBLL9K57SXtxI0jBA", unique_id: "AgADAQADPwxgSw", is_uploading_active: false, is_uploading_completed: true, uploaded_size: 104932 } } }), type_: Pattern(BackgroundTypePattern { extra: None, client_id: None, fill: FreeformGradient(BackgroundFillFreeformGradient { extra: None, client_id: None, colors: [4155708, 4666134, 7495993, 2439462] }), intensity: 60, is_inverted: true, is_moving: false }) }), outgoing_message_fill: Gradient(BackgroundFillGradient { extra: None, client_id: None, top_color: 11431746, bottom_color: 11371840, rotation_angle: 0 }), animate_outgoing_message_fill: false, outgoing_message_accent_color: 5866826 } }, ChatTheme { extra: None, client_id: None, name: "๐ŸŽฎ", light_settings: ThemeSettings { extra: None, client_id: None, accent_color: 6916326, background: Some(Background { extra: None, client_id: None, id: 5431860274715951105, is_default: false, is_dark: true, name: "8W_Y_CTYYUsBAAAAVhlSxz_CnZk", document: Some(Document { extra: None, client_id: None, file_name: "pattern.tgv", mime_type: "application/x-tgwallpattern", minithumbnail: None, thumbnail: Some(Thumbnail { extra: None, client_id: None, format: Png(ThumbnailFormatPng { extra: None, client_id: None }), width: 156, height: 320, file: File { extra: None, client_id: None, id: 15, size: 21843, expected_size: 21843, local: LocalFile { extra: None, client_id: None, path: "", can_be_downloaded: true, can_be_deleted: false, is_downloading_active: false, is_downloading_completed: false, download_offset: 0, downloaded_prefix_size: 0, downloaded_size: 0 }, remote: RemoteFile { extra: None, client_id: None, id: "AAMCAQADFQABY6KZaZeEAAFHdj6D4xua34Rx0KQ9AAIBAAPHL2BLtDRmxEd2S-oBAAdtAAMjBA", unique_id: "AQADAQADxy9gS3I", is_uploading_active: false, is_uploading_completed: true, uploaded_size: 21843 } } }), document: File { extra: None, client_id: None, id: 16, size: 78338, expected_size: 78338, local: LocalFile { extra: None, client_id: None, path: "", can_be_downloaded: true, can_be_deleted: false, is_downloading_active: false, is_downloading_completed: false, download_offset: 0, downloaded_prefix_size: 0, downloaded_size: 0 }, remote: RemoteFile { extra: None, client_id: None, id: "EAACAgEAAxUAAWOimWmXhAABR3Y-g-Mbmt-EcdCkPQACAQADxy9gS7Q0ZsRHdkvqIwQ", unique_id: "AgADAQADxy9gSw", is_uploading_active: false, is_uploading_completed: true, uploaded_size: 78338 } } }), type_: Pattern(BackgroundTypePattern { extra: None, client_id: None, fill: FreeformGradient(BackgroundFillFreeformGradient { extra: None, client_id: None, colors: [4247006, 11306733, 15303896, 14724429] }), intensity: 52, is_inverted: false, is_moving: false }) }), outgoing_message_fill: Solid(BackgroundFillSolid { extra: None, client_id: None, color: 16774101 }), animate_outgoing_message_fill: false, outgoing_message_accent_color: 13410377 }, dark_settings: ThemeSettings { extra: None, client_id: None, accent_color: 7370188, background: Some(Background { extra: None, client_id: None, id: 5431860274715951105, is_default: false, is_dark: true, name: "8W_Y_CTYYUsBAAAAVhlSxz_CnZk", document: Some(Document { extra: None, client_id: None, file_name: "pattern.tgv", mime_type: "application/x-tgwallpattern", minithumbnail: None, thumbnail: Some(Thumbnail { extra: None, client_id: None, format: Png(ThumbnailFormatPng { extra: None, client_id: None }), width: 156, height: 320, file: File { extra: None, client_id: None, id: 15, size: 21843, expected_size: 21843, local: LocalFile { extra: None, client_id: None, path: "", can_be_downloaded: true, can_be_deleted: false, is_downloading_active: false, is_downloading_completed: false, download_offset: 0, downloaded_prefix_size: 0, downloaded_size: 0 }, remote: RemoteFile { extra: None, client_id: None, id: "AAMCAQADFQABY6KZaZeEAAFHdj6D4xua34Rx0KQ9AAIBAAPHL2BLtDRmxEd2S-oBAAdtAAMjBA", unique_id: "AQADAQADxy9gS3I", is_uploading_active: false, is_uploading_completed: true, uploaded_size: 21843 } } }), document: File { extra: None, client_id: None, id: 16, size: 78338, expected_size: 78338, local: LocalFile { extra: None, client_id: None, path: "", can_be_downloaded: true, can_be_deleted: false, is_downloading_active: false, is_downloading_completed: false, download_offset: 0, downloaded_prefix_size: 0, downloaded_size: 0 }, remote: RemoteFile { extra: None, client_id: None, id: "EAACAgEAAxUAAWOimWmXhAABR3Y-g-Mbmt-EcdCkPQACAQADxy9gS7Q0ZsRHdkvqIwQ", unique_id: "AgADAQADxy9gSw", is_uploading_active: false, is_uploading_completed: true, uploaded_size: 78338 } } }), type_: Pattern(BackgroundTypePattern { extra: None, client_id: None, fill: FreeformGradient(BackgroundFillFreeformGradient { extra: None, client_id: None, colors: [4226963, 1326682, 6708886, 3878219] }), intensity: 58, is_inverted: true, is_moving: false }) }), outgoing_message_fill: FreeformGradient(BackgroundFillFreeformGradient { extra: None, client_id: None, colors: [11958341, 9848425, 6375839, 2981550] }), animate_outgoing_message_fill: false, outgoing_message_accent_color: 7370188 } }] })
2022-12-21T13:35:24.325047074+08:00 INFO tg_bot_tdlib - updates handler received ScopeNotificationSettings(UpdateScopeNotificationSettings { extra: None, client_id: Some(1), scope: PrivateChats(NotificationSettingsScopePrivateChats { extra: None, client_id: None }), notification_settings: ScopeNotificationSettings { extra: None, client_id: None, mute_for: 0, sound: "default", show_preview: true, disable_pinned_message_notifications: false, disable_mention_notifications: false } })
2022-12-21T13:35:24.325170125+08:00 INFO tg_bot_tdlib - updates handler received ScopeNotificationSettings(UpdateScopeNotificationSettings { extra: None, client_id: Some(1), scope: GroupChats(NotificationSettingsScopeGroupChats { extra: None, client_id: None }), notification_settings: ScopeNotificationSettings { extra: None, client_id: None, mute_for: 0, sound: "default", show_preview: true, disable_pinned_message_notifications: false, disable_mention_notifications: false } })
2022-12-21T13:35:24.325211698+08:00 INFO tg_bot_tdlib - updates handler received ScopeNotificationSettings(UpdateScopeNotificationSettings { extra: None, client_id: Some(1), scope: ChannelChats(NotificationSettingsScopeChannelChats { extra: None, client_id: None }), notification_settings: ScopeNotificationSettings { extra: None, client_id: None, mute_for: 0, sound: "default", show_preview: true, disable_pinned_message_notifications: false, disable_mention_notifications: false } })
2022-12-21T13:35:24.325233891+08:00 INFO tg_bot_tdlib - updates handler received ChatFilters(UpdateChatFilters { extra: None, client_id: Some(1), chat_filters: [] })
2022-12-21T13:35:24.325253400+08:00 INFO tg_bot_tdlib - updates handler received ConnectionState(UpdateConnectionState { extra: None, client_id: Some(1), state: Connecting(ConnectionStateConnecting { extra: None, client_id: None }) })
2022-12-21T13:35:24.325271145+08:00 INFO tg_bot_tdlib - updates handler received ConnectionState(UpdateConnectionState { extra: None, client_id: Some(1), state: Updating(ConnectionStateUpdating { extra: None, client_id: None }) })
2022-12-21T13:35:24.325286790+08:00 INFO tg_bot_tdlib - updates handler received HavePendingNotifications(UpdateHavePendingNotifications { extra: None, client_id: Some(1), have_delayed_notifications: false, have_unreceived_notifications: false })
2022-12-21T13:35:24.325301578+08:00 INFO tg_bot_tdlib - updates handler received ConnectionState(UpdateConnectionState { extra: None, client_id: Some(1), state: Ready(ConnectionStateReady { extra: None, client_id: None }) })
2022-12-21T13:35:24.325316101+08:00 INFO tg_bot_tdlib - updates handler received SuggestedActions(UpdateSuggestedActions { extra: None, client_id: Some(1), added_actions: [CheckPhoneNumber(SuggestedActionCheckPhoneNumber { extra: None, client_id: None }), ViewChecksHint(SuggestedActionViewChecksHint { extra: None, client_id: None })], removed_actions: [] })
2022-12-21T13:35:24.325375692+08:00 INFO tg_bot_tdlib - updates handler received User(UpdateUser { extra: None, client_id: Some(1), user: User { extra: None, client_id: None, id: 5000443693, first_name: "Eric", last_name: "Deng", username: "", phone_number: "###########", status: Offline(UserStatusOffline { extra: None, client_id: None, was_online: 1671598776 }), profile_photo: None, is_contact: false, is_mutual_contact: false, is_verified: false, is_support: false, restriction_reason: "", is_scam: false, is_fake: false, have_access: true, type_: Regular(UserTypeRegular { extra: None, client_id: None }), language_code: "" } })

issue compiling rust-tdlib

Hello! Thanks again for your help on the last issue. I'll try to respond quicker this time!

The error I'm getting is when I try to compile the newest version of rust-tdlib (0.4.2):

error[E0432]: unresolved imports `tokio::task::JoinHandle`, `tokio::time`
  --> /Users/kojinglick/.cargo/registry/src/github.com-1ecc6299db9ec823/rust-tdlib-0.4.2/src/client/worker.rs:26:5
   |
26 |     task::JoinHandle,
   |     ^^^^^^^^^^^^^^^^ no `JoinHandle` in `task`
27 |     time,
   |     ^^^^ no `time` in the root
   |
help: consider importing this struct instead
   |
26 |     std::thread::JoinHandle;
   |
help: consider importing one of these items instead
   |
27 |     core::time;
   |
27 |     std::time;
   |

error[E0433]: failed to resolve: could not find `Handle` in `runtime`
   --> /Users/kojinglick/.cargo/registry/src/github.com-1ecc6299db9ec823/rust-tdlib-0.4.2/src/client/worker.rs:385:43
    |
385 |             let current = tokio::runtime::Handle::try_current().unwrap();
    |                                           ^^^^^^ could not find `Handle` in `runtime`

error[E0433]: failed to resolve: could not find `SendTimeoutError` in `error`
  --> /Users/kojinglick/.cargo/registry/src/github.com-1ecc6299db9ec823/rust-tdlib-0.4.2/src/errors.rs:75:39
   |
75 |             tokio::sync::mpsc::error::SendTimeoutError::Timeout(_) => SEND_TO_CHANNEL_TIMEOUT,
   |                                       ^^^^^^^^^^^^^^^^ could not find `SendTimeoutError` in `error`

error[E0433]: failed to resolve: could not find `SendTimeoutError` in `error`
  --> /Users/kojinglick/.cargo/registry/src/github.com-1ecc6299db9ec823/rust-tdlib-0.4.2/src/errors.rs:76:39
   |
76 |             tokio::sync::mpsc::error::SendTimeoutError::Closed(_) => CLOSED_CHANNEL_ERROR,
   |                                       ^^^^^^^^^^^^^^^^ could not find `SendTimeoutError` in `error`

error[E0425]: cannot find function `spawn` in crate `tokio`
   --> /Users/kojinglick/.cargo/registry/src/github.com-1ecc6299db9ec823/rust-tdlib-0.4.2/src/client/worker.rs:357:16
    |
357 |         tokio::spawn(async move {
    |                ^^^^^ not found in `tokio`
    |
help: consider importing this function
    |
2   | use std::thread::spawn;
    |
help: if you import `spawn`, refer to it directly
    |
357 -         tokio::spawn(async move {
357 +         spawn(async move {
    |

error[E0425]: cannot find function `spawn` in crate `tokio`
   --> /Users/kojinglick/.cargo/registry/src/github.com-1ecc6299db9ec823/rust-tdlib-0.4.2/src/client/worker.rs:384:16
    |
384 |         tokio::spawn(async move {
    |                ^^^^^ not found in `tokio`
    |
help: consider importing this function
    |
2   | use std::thread::spawn;
    |
help: if you import `spawn`, refer to it directly
    |
384 -         tokio::spawn(async move {
384 +         spawn(async move {
    |

error[E0425]: cannot find function `spawn` in crate `tokio`
   --> /Users/kojinglick/.cargo/registry/src/github.com-1ecc6299db9ec823/rust-tdlib-0.4.2/src/client/worker.rs:431:16
    |
431 |         tokio::spawn(async move {
    |                ^^^^^ not found in `tokio`
    |
help: consider importing this function
    |
2   | use std::thread::spawn;
    |
help: if you import `spawn`, refer to it directly
    |
431 -         tokio::spawn(async move {
431 +         spawn(async move {
    |

error[E0412]: cannot find type `SendTimeoutError` in module `tokio::sync::mpsc::error`
  --> /Users/kojinglick/.cargo/registry/src/github.com-1ecc6299db9ec823/rust-tdlib-0.4.2/src/errors.rs:72:40
   |
72 | impl<T> From<tokio::sync::mpsc::error::SendTimeoutError<T>> for Error {
   |                                        ^^^^^^^^^^^^^^^^ not found in `tokio::sync::mpsc::error`

error[E0412]: cannot find type `SendTimeoutError` in module `tokio::sync::mpsc::error`
  --> /Users/kojinglick/.cargo/registry/src/github.com-1ecc6299db9ec823/rust-tdlib-0.4.2/src/errors.rs:73:44
   |
73 |     fn from(err: tokio::sync::mpsc::error::SendTimeoutError<T>) -> Self {
   |                                            ^^^^^^^^^^^^^^^^ not found in `tokio::sync::mpsc::error`

error[E0603]: module `runtime` is private
   --> /Users/kojinglick/.cargo/registry/src/github.com-1ecc6299db9ec823/rust-tdlib-0.4.2/src/client/worker.rs:385:34
    |
385 |             let current = tokio::runtime::Handle::try_current().unwrap();
    |                                  ^^^^^^^ private module
    |
note: the module `runtime` is defined here
   --> /Users/kojinglick/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.27.0/src/lib.rs:525:5
    |
525 |     pub(crate) mod runtime;
    |     ^^^^^^^^^^^^^^^^^^^^^^

error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates
  --> /Users/kojinglick/.cargo/registry/src/github.com-1ecc6299db9ec823/rust-tdlib-0.4.2/src/errors.rs:72:6
   |
72 | impl<T> From<tokio::sync::mpsc::error::SendTimeoutError<T>> for Error {
   |      ^ unconstrained type parameter

Some errors have detailed explanations: E0207, E0412, E0425, E0432, E0433, E0603.
For more information about an error, try `rustc --explain E0207`.
error: could not compile `rust-tdlib` due to 11 previous errors

My Cargo.toml:

[package]
name = "rust_login_streamlining"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
rust-tdlib  = "0.4.2"
futures = "0.3"

Would absolutely appreciate guidance on this. Most likely I'm not doing something right.

cannot deserialize to update: Error("unknown variant `updateReactions`

Hi!
Thank you for your great crate!

But looks like it needs adding updateReactions and updateAttachmentMenuBots for solving errors

rust-tdlib-0.4.1/src/client/worker.rs line 475

cannot deserialize to update: Error("unknown variant updateAttachmentMenuBots, expected one of _Default, testUseUpdate, updateActiveNotifications, updateAnimatedEmojiMessageClicked, updateAnimationSearchParameters, ... updateUserFullInfo, updateUserPrivacySettingRules, updateUserStatus, updateUsersNearby", line: 0, column: 0), data: "{\"@type\":\"updateAttachmentMenuBots\",\"bots\":[],\"@client_id\":1}"

and the same for updateFileDownloads:

cannot deserialize to update: Error("unknown variant updateFileDownloads, expected one of _Default, testUseUpdate, updateActiveNotifications, updateAnimatedEmojiMessageClicked, updateAnimationSearchParameters, ... updateUserFullInfo, updateUserPrivacySettingRules, updateUserStatus, updateUsersNearby", line: 0, column: 0), data: "{\"@type\":\"updateFileDownloads\",\"total_size\":0,\"total_count\":0,\"downloaded_size\":0,\"@client_id\":1}"

and for updateChatAvailableReactions:

cannot deserialize to update: Error("unknown variant updateChatAvailableReactions, expected one of _Default, testUseUpdate, updateActiveNotifications, updateAnimatedEmojiMessageClicked, updateAnimationSearchParameters, ... updateUserFullInfo, updateUserPrivacySettingRules, updateUserStatus, updateUsersNearby", line: 0, column: 0), data: "{\"@type\":\"updateChatAvailableReactions\",\"chat_id\":777000,\"available_reactions\":[\"\\ud83d\\udc4d\",\"\\ud83d\\udc4e\",\"\\u2764\",\"\\ud83d\\udd25\",\"\\ud83e\\udd70\",\"\\ud83d\\udc4f\",\"\\ud83d\\ude01\",\"\\ud83e\\udd14\",\"\\ud83e\\udd2f\",\"\\ud83d\\ude31\",\"\\ud83e\\udd2c\",\"\\ud83d\\ude22\",\"\\ud83c\\udf89\",\"\\ud83e\\udd29\",\"\\ud83e\\udd2e\",\"\\ud83d\\udca9\",\"\\ud83d\\ude4f\",\"\\ud83d\\udc4c\",\"\\ud83d\\udd4a\",\"\\ud83e\\udd21\",\"\\ud83e\\udd71\",\"\\ud83e\\udd74\",\"\\ud83d\\ude0d\",\"\\ud83d\\udc33\",\"\\u2764\\u200d\\ud83d\\udd25\",\"\\ud83c\\udf1a\",\"\\ud83c\\udf2d\",\"\\ud83d\\udcaf\",\"\\ud83e\\udd23\",\"\\u26a1\",\"\\ud83c\\udf4c\",\"\\ud83c\\udfc6\",\"\\ud83d\\udc94\",\"\\ud83e\\udd28\",\"\\ud83d\\ude10\",\"\\ud83c\\udf53\",\"\\ud83c\\udf7e\",\"\\ud83d\\udc8b\",\"\\ud83d\\udd95\",\"\\ud83d\\ude08\",\"\\ud83d\\ude34\",\"\\ud83d\\ude2d\",\"\\ud83e\\udd13\",\"\\ud83d\\udc7b\",\"\\ud83d\\udc68\\u200d\\ud83d\\udcbb\",\"\\ud83d\\udc40\",\"\\ud83c\\udf83\",\"\\ud83d\\ude48\",\"\\ud83d\\ude07\",\"\\ud83d\\ude28\",\"\\ud83e\\udd1d\",\"\\u270d\",\"\\ud83e\\udd17\",\"\\ud83e\\udee1\"],\"@client_id\":1}"

Cann't build

Perhaps this problem does not apply to your library, but I will still be grateful for help

Compiling env_logger v0.10.0
Compiling rust-tdlib v0.4.2 (https://github.com/antonio-antuan/rust-tdlib.git#5d719faf)
Compiling rustislav v0.1.0 (/home/taimast/rustislav)
error: linking with cc failed: exit status: 1
|
= note: LC_ALL="C" PATH="/home/taimast/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/bin:/home/taimast/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin:/home/taimast/Documents/td/build:/home/taimast/Documents/td/build/pkgconfig" VSLANG="1033" "cc" "-m64" "/tmp/rustccs5goz/symbols.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.10fnbvg09a1g4ugc.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.10m65jycb01zqpps.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.1111lobduqz601gq.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.12y05043dvopj60z.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.13j76qdcz2z7m29i.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.16204fmtn2340zq0.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.162watzp1558p32e.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.17372rpx5i50umn1.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.17atydnix0m3oi84.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.17z2m8y9cq2dctlt.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.18i7yovek9ug8qy1.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.18s2hd3ro53t4834.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.196ipbhy3thkwc58.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.19yrze0rfy33tcsk.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.1aur1ynuqizuxzdu.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.1azegrm0jtujd8wd.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.1b61h2zlm42i6nt0.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.1eflad17nujdg7wp.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.1fgllw3sicu50kkl.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.1fsone97opoa373m.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.1gbvlbvmzfobibpm.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.1h5o43o273dbbwpe.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.1io5zxx06aeqc3qt.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.1ja3tpht10xwtg07.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.1ja84j55gee9l3z5.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.1kdcqp5wn6xnfwpi.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.1kmcmlcz885gn9b2.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.1l58s4d4v18lr0u4.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.1lsm4c1179q31kg0.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.1mu8uyzw60c4x0oa.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.1ogvsepaprgg2r1g.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.1p3hvfe1t77i82in.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.1prcmrqvht8emelp.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.1q7i5xu60nwrlofq.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.1qk8rihvb1odht41.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.1rb32xaep6lupztw.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.1rc3gysic3z8f62j.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.1rcetn0d7vvaznge.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.1svzgvks9beu8h8u.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.1tefqtopu29n1ejr.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.1tqjax8k3twxktee.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.1ucsedy2zyi9bax8.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.1vilooqn9us53ddz.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.1voldx6d1m8fq4s4.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.1vsdgdroj83435x7.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.1vyz2onziuthj664.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.1vzz903rrnox57hm.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.1wynn0anfx2jnp0d.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.1zdwbac0fng22fub.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.1zm8n8xqaeal8i8b.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.1zyaa8x6n49trr4n.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.20t4ypp0stpt5yrx.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.20y90gbwrgiba6mt.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.22oos50w8ika33st.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.22q9tyhsq268clfx.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.232xi2mpj155gsef.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.23ig96atxj3ajjhv.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.23keindqu1940np.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.23p6kiangur8zlr8.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.24yf61e0bnxislsd.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.25gbwyya8i961kfi.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.25nmkijd5qqcazsc.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.265784ctzk3fpurc.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.26w2z3c0idq1vbdk.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.27qba04wr5h1jatj.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.28zacwkpp0e2vf7h.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.295xj5zlb96ajmzj.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.29jlxgw379tggkk0.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.2au0ermixxoq3c1j.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.2ebyelg3k2rjc8p4.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.2hkkhnwwh7m5zwvw.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.2hunur5tju4pfnt5.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.2hytk4tmqfoa44sy.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.2i60andihr1ulsq3.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.2ihenvl7j2vnmxs9.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.2m30aqt9ybxzkkqf.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.2miy0mx75qp6rdb0.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.2n7krsd945nr3rsd.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.2nehbbilbcmz7lwk.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.2o2hpkdcau0tyc1o.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.2piwdg6v3mveegek.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.2pvu4kqcjj2d9oar.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.2rdkc1k4g8xlypo8.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.2sqb1t4pr238xy79.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.2tby2z36eof8kp6z.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.2unbkk54wfgesw27.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.2v7bxk59sms0hlrz.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.2vv87becap5r4b2.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.2wlwrlju6pvowt5s.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.2ygfg1tadoc3jsrl.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.2zu7nbft7j2niy6p.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.31s4m1vaiv038n76.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.31snroipo6dqntk4.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.33dldzpypfskwmn4.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.34qbtuy6g1j0pryh.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.34u3preieff6oymt.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.354dx4x69uy0f77k.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.36ej6qydu25cbcp3.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.378sd15rytjxmktk.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.37aphb0zo9voa164.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.382fcg2wxynet9ot.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.384g4n5e0iqlxhhh.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.3996v9zikplb8yaj.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.39tf96bv8gy0j1nh.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.3a35kh18i0a4nzkw.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.3a80rqc3uh0l7f6u.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.3c4raokr20s4cvsu.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.3fjiezp5stt39x2k.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.3fyys8ouok3bs6my.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.3g3kyakzbqii4dv9.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.3ga4ir2xfezczilb.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.3hdyvqp5yv7en4ca.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.3hvlsequsf02nfg7.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.3hzhm6j0ehgo1mv9.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.3i7luwewclqd31v6.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.3iqvc0na40xx4vi.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.3jyxnb8klsnd030r.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.3kf5lc2ffji5ti1g.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.3kx4dbl799abanw9.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.3p9gmvtjmuu2xs4a.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.3puuzy3an54longs.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.3quk4qqpln4jjeir.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.3slk2gmklbd2basw.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.3t17r0bg2pxvo408.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.3t5arm8li1aubbjb.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.3tma91rjrfko69az.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.3tx9wfozo7j1uhut.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.3ugfgzis5ak8fc2y.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.3uqw33lbq5c80suj.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.3w94nzkxqyjgt6gg.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.3wd47pclpgo7y1cg.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.3wlvs2pnu1rzkkjr.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.3ynx0lsic00d1o5s.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.3zks285631rmshgs.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.3zm0njchv7zvvku6.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.419rdthewycpan1j.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.41j4r5o7q78hep3z.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.42ij8k1u8bec9mb3.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.42q0h7wmcxy6t5xt.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.43j33z5uau31erc9.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.43wklnb27mg58oql.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.4401cejy84bwzyoo.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.454q9e3qrnbq7b8b.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.48vwgqxs26a4q0u.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.493vje233m1oux3a.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.4a4vskvz5hsbdw49.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.4abxpnu4i3kej7al.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.4adr0p89n6d4rtji.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.4af51jp0pg0sr4mu.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.4b5h717xyegui29t.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.4batodcr04e5ugsz.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.4ceoetzrzbbrxhyc.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.4cls5ed14pcsw9uo.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.4ee0zmtx7tkp7a0d.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.4gw9rok5ss5g99vr.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.4i8mpz0p4xpdj2xa.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.4iag981sc7up21hx.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.4ivfv3rjz8xfypwk.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.4jxqda0gmj8aozsv.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.4jxr5im64fowbn9g.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.4kutwvek9csusay5.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.4no05h5dd9rzqufk.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.4nroekmtdjh5flwb.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.4nwgzd1kwc2qoksi.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.4qbnoug1l14tj37f.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.4rzo4jvfxhloyzwh.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.4s2d99n8ovvjsrxf.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.4s5dkweiqjxcx0wm.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.4sgccm6snbe5crw8.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.4uir0c9css47x5i5.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.4v86ri272gy5k9au.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.4vaipnzgeo70ii9p.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.4vufcstsz34kzdys.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.4w4i7il1nldvx4bj.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.4wgjwxiqrj42ewyo.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.4wgllle6w3x4g20b.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.4wqe0tycbd632ofy.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.4wrd41cote3d0cuw.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.4xqisiwsqude4tqy.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.502c2h7gi6zjhtw9.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.504bzhlrt6rf20tb.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.51085r6mzotnvnuj.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.51vc9mdbdh62j5sh.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.52mm3kpzwfx5g5k2.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.539wynwt5zxz8m6l.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.53oc9evpb1nmn9a5.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.53oind8n03uap23n.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.53vv07h5bh2uylmc.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.54hkzn295kcnfej6.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.54krhry90srmfp9c.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.54q5h1djvmbe6fil.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.54u19i1iod2mfe4u.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.55ey59stex6ldd3x.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.55k27v62zy9yepg5.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.55ltcl6sku4memls.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.55mfvsitwbk8zb6i.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.55mofmpseaf57y8i.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.56h7h49p397kapu2.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.57fv9gipajz1spog.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.57jzswg6ucxqyl5x.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.57wn09z68grpr58c.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.586rqt0s80m9n9zc.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.587mrqjis79jyr1o.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.58ls0u61lamz0v6x.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.5avysumnazpeuoaf.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.5bfj9xzq3c4xhlz2.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.5bjon8ppvb6x24ml.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.5cfnjvrpo3ek0w5h.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.5cm1hvk8l2k0yxij.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.5dvb8jrbbtn2vl8d.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.5dwr6758e7s0cil.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.5dy25kkjft61w18p.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.5es3v5g2wiyc33ez.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.5ftsne4i9ke2va08.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.5yddqpo3hmjzr9u.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.61ccp8b2rk51evy.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.6fqdbf4fg9hvuzn.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.6yueqwo4m7vzgvj.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.73u0eo916eemms8.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.7ea5lywvuwrhbek.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.7ggab22d6r53vei.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.7rfqijhnz5gsx03.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.8mpm9swnkrsgqzj.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.90kzxcsq984v8mg.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.9qbq68iqzjt35i1.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.agr0swkuiv7igxf.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.bo466kwluqdftid.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.ccqeyraor099mhb.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.cebl70c5m6qhkru.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.cor550kl0nz7oq0.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.d9a6wrlok9zhy0j.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.dxubesg60o51vf8.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.ft9b4rd6yfwxet3.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.gqmb7z1xreowqm9.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.htosnjnfg0v3sbe.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.kmu1s2i9grcd703.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.knl6aq6v5g1ll1z.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.krowd8m24dbg5b7.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.l8ofwihn0utyml8.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.lkvmrjp6wfybq28.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.mamy5f7o727brg1.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.mdhpoyu4ibtdmxk.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.mdjtermqcvtx0ge.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.p8u9waeslwh58hk.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.pksoe5ns9pmk0rt.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.sdnlovb5etw60jw.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.szbkgxrhwmxgkt.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.u3vfpcovwcdsvt3.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.v3a26es2t2cmer2.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.vjrq8nl3y8lu7rx.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.wqy1yjy7z3jw2du.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.x67nnlh3356wntm.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.x9k5s4njk0kgqg0.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.ya9gjw2l68la9ar.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.zhzlg3w27n1gu69.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.zly2gi8dezxgr2a.rcgu.o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da.1nfamtrjmuryrnpg.rcgu.o" "-Wl,--as-needed" "-L" "/home/taimast/rustislav/target/debug/deps" "-L" "/home/taimast/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/home/taimast/rustislav/target/debug/deps/libenv_logger-9ef8fcf7bfc0772f.rlib" "/home/taimast/rustislav/target/debug/deps/libtermcolor-65c99b4c957e314f.rlib" "/home/taimast/rustislav/target/debug/deps/libis_terminal-1e9376e15c60fb1d.rlib" "/home/taimast/rustislav/target/debug/deps/librustix-bac938b7e58e9719.rlib" "/home/taimast/rustislav/target/debug/deps/libbitflags-f255a966af175049.rlib" "/home/taimast/rustislav/target/debug/deps/liblinux_raw_sys-67b8335e06167307.rlib" "/home/taimast/rustislav/target/debug/deps/libio_lifetimes-0861c285f6a9ecc3.rlib" "/home/taimast/rustislav/target/debug/deps/libhumantime-4b67dc4c8b3e65e6.rlib" "/home/taimast/rustislav/target/debug/deps/libregex-8434b3c4d65c7af8.rlib" "/home/taimast/rustislav/target/debug/deps/libaho_corasick-8a2165c9cdede955.rlib" "/home/taimast/rustislav/target/debug/deps/libregex_syntax-a4d0389b6dab3610.rlib" "/home/taimast/rustislav/target/debug/deps/librust_tdlib-38a634f010cd5f8f.rlib" "/home/taimast/rustislav/target/debug/deps/libserde_json-c0501b653df80353.rlib" "/home/taimast/rustislav/target/debug/deps/libryu-69fc74dff33c2357.rlib" "/home/taimast/rustislav/target/debug/deps/libitoa-10f0ed6338a99ace.rlib" "/home/taimast/rustislav/target/debug/deps/liblazy_static-a4b93b218206bfb3.rlib" "/home/taimast/rustislav/target/debug/deps/libuuid-9ac57cd054f398b3.rlib" "/home/taimast/rustislav/target/debug/deps/libgetrandom-50320433eafb7cf2.rlib" "/home/taimast/rustislav/target/debug/deps/libserde-c53dd859125e4563.rlib" "/home/taimast/rustislav/target/debug/deps/libtokio-0c94725cb4404dcf.rlib" "/home/taimast/rustislav/target/debug/deps/libsignal_hook_registry-1969dc1c8fc4e12f.rlib" "/home/taimast/rustislav/target/debug/deps/libnum_cpus-4289548bac825e71.rlib" "/home/taimast/rustislav/target/debug/deps/libsocket2-e554a17285e70d37.rlib" "/home/taimast/rustislav/target/debug/deps/libbytes-28387dfd208abad2.rlib" "/home/taimast/rustislav/target/debug/deps/libmio-63e63826d0aa6b25.rlib" "/home/taimast/rustislav/target/debug/deps/liblog-b7fb7a235c9b8a36.rlib" "/home/taimast/rustislav/target/debug/deps/libparking_lot-4b058f50347f99fc.rlib" "/home/taimast/rustislav/target/debug/deps/libparking_lot_core-b48b4fbb7822046c.rlib" "/home/taimast/rustislav/target/debug/deps/liblibc-9de7ca31dbbda4df.rlib" "/home/taimast/rustislav/target/debug/deps/libcfg_if-305ff6ac5e1cfc5a.rlib" "/home/taimast/rustislav/target/debug/deps/libsmallvec-6e1c17b845005b75.rlib" "/home/taimast/rustislav/target/debug/deps/liblock_api-9a7e2c82eba27af4.rlib" "/home/taimast/rustislav/target/debug/deps/libscopeguard-b113cbb63487fa8b.rlib" "/home/taimast/rustislav/target/debug/deps/libfutures-58befbee422d7bea.rlib" "/home/taimast/rustislav/target/debug/deps/libfutures_executor-161e50a102b5f478.rlib" "/home/taimast/rustislav/target/debug/deps/libfutures_util-2796a3e618c0a085.rlib" "/home/taimast/rustislav/target/debug/deps/libmemchr-4b45861a1c6643cb.rlib" "/home/taimast/rustislav/target/debug/deps/libfutures_io-dcc885ec8dfefb4f.rlib" "/home/taimast/rustislav/target/debug/deps/libslab-36943f7d4733abbb.rlib" "/home/taimast/rustislav/target/debug/deps/libfutures_channel-651aa2571621cee1.rlib" "/home/taimast/rustislav/target/debug/deps/libpin_project_lite-de2242674ceb8fba.rlib" "/home/taimast/rustislav/target/debug/deps/libfutures_sink-5e07586b0647ca53.rlib" "/home/taimast/rustislav/target/debug/deps/libfutures_task-8410ba65cb54e24e.rlib" "/home/taimast/rustislav/target/debug/deps/libpin_utils-6c2e1295fd05a6e7.rlib" "/home/taimast/rustislav/target/debug/deps/libfutures_core-7509b0dd6bc82e0b.rlib" "/home/taimast/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-bc6b80525d6b1f3b.rlib" "/home/taimast/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-dbb416fff97e9855.rlib" "/home/taimast/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-af60be54961a030f.rlib" "/home/taimast/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-1303bc5098cb2f44.rlib" "/home/taimast/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-96ca4807f9d03fdf.rlib" "/home/taimast/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-03b108942351d49a.rlib" "/home/taimast/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-b348df34b7d8ac11.rlib" "/home/taimast/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-26a06d9c5ec29d3a.rlib" "/home/taimast/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-b5295fdab67e4cf6.rlib" "/home/taimast/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-b257ed099e7f67d0.rlib" "/home/taimast/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-c27b5dca54e295d8.rlib" "/home/taimast/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-f6c8245d52afa66d.rlib" "/home/taimast/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-642c68f15c02cc52.rlib" "/home/taimast/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-eecd84150c4ad967.rlib" "/home/taimast/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-123ffa13a38501db.rlib" "/home/taimast/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-2177aff67f4e9999.rlib" "/home/taimast/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-2298a66e03bd0fd2.rlib" "/home/taimast/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-f3c3b25345711552.rlib" "/home/taimast/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-10f041ff25bad5f3.rlib" "-Wl,-Bdynamic" "-ltdjson" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-znoexecstack" "-L" "/home/taimast/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/home/taimast/rustislav/target/debug/deps/rustislav-b4a9331669d548da" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro,-znow" "-nodefaultlibs"
= note: /usr/bin/ld: cannot find -ltdjson: No such file or directory
collect2: error: ld returned 1 exit status

error: could not compile rustislav due to previous error

Valid api_id must be provided.

The #35 is happening in version 1.8.21 again

[ 3][t 4][1700971024.492456197][Td.cpp:4112][#1][!Td][&td_requests]     Sending update: updateOption {
  name = "version"
  value = optionValueString {
    value = "1.8.21"
  }
}
setTdlibParameters {
  use_test_dc = false
  database_directory = ""
  files_directory = ""
  database_encryption_key = bytes [0] { }
  use_file_database = false
  use_chat_info_database = false
  use_message_database = false
  use_secret_chats = false
  api_id = 0
  api_hash = ""
  system_language_code = ""
  device_model = ""
  system_version = ""
  application_version = ""
  enable_storage_optimizer = false
  ignore_file_names = false
}

they are "" and 0 even when i set them manually.
is there any fix for this?

Serialization error

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

Cannot compile

Hello i was trying to use the lib (version 0.4.0) but here's what happens when i try to compile the example bellow :

use rust_tdlib::client::Worker;
use rust_tdlib::types::{GetMe, TdlibParameters};

#[tokio::main]
async fn main() {
   let mut worker = Worker::builder().build().unwrap();
    let waiter = worker.start();
    let tdlib_params = TdlibParameters::builder().api_id(env!("id").parse::<i32>().unwrap()).api_hash(env!("HASH")).build();
    let client = rust_tdlib::client::Client::builder().with_tdlib_parameters(tdlib_params).build();
    let (client_state, client) = worker.bind_client(client1).await.unwrap();
    let me = client.get_me(GetMe::builder().build()).await.unwrap();
    println!("{:?}", me);
}

i use rustc 1.62.1 (e092d0b6b 2022-07-16)

Error log

   Compiling proc-macro2 v1.0.42
   Compiling unicode-ident v1.0.2
   Compiling quote v1.0.20
   Compiling syn v1.0.98
   Compiling autocfg v1.1.0
   Compiling futures-core v0.3.21
   Compiling futures-channel v0.3.21
   Compiling futures-task v0.3.21
   Compiling memchr v2.5.0
   Compiling pin-project-lite v0.2.9
   Compiling futures-util v0.3.21
   Compiling futures-sink v0.3.21
   Compiling cfg-if v1.0.0
   Compiling pin-utils v0.1.0
   Compiling futures-io v0.3.21
   Compiling serde v1.0.140
   Compiling async-trait v0.1.56
   Compiling log v0.4.17
   Compiling serde_json v1.0.82
   Compiling serde_derive v1.0.140
   Compiling ryu v1.0.10
   Compiling itoa v1.0.2
   Compiling lazy_static v1.4.0
   Compiling getrandom v0.2.7
   Compiling uuid v0.8.2
   Compiling slab v0.4.7
   Compiling tokio v1.20.1
   Compiling futures-macro v0.3.21
   Compiling tokio-macros v1.8.0
   Compiling futures-executor v0.3.21
   Compiling futures v0.3.21
   Compiling rust-tdlib v0.4.0
error[E0432]: unresolved imports `tokio::task::JoinHandle`, `tokio::time`
  --> C:\Users\****\.cargo\registry\src\github.com-1ecc6299db9ec823\rust-tdlib-0.4.0\src\client\worker.rs:25:5
   |
25 |     task::JoinHandle,
   |     ^^^^^^^^^^^^^^^^ no `JoinHandle` in `task`
26 |     time,
   |     ^^^^ no `time` in the root

error[E0433]: failed to resolve: could not find `runtime` in `tokio`
   --> C:\Users\****\.cargo\registry\src\github.com-1ecc6299db9ec823\rust-tdlib-0.4.0\src\client\worker.rs:364:34
    |
364 |             let current = tokio::runtime::Handle::try_current().unwrap();
    |                                  ^^^^^^^ could not find `runtime` in `tokio`

error[E0433]: failed to resolve: could not find `SendTimeoutError` in `error`
  --> C:\Users\****\.cargo\registry\src\github.com-1ecc6299db9ec823\rust-tdlib-0.4.0\src\errors.rs:75:39
   |
75 |             tokio::sync::mpsc::error::SendTimeoutError::Timeout(_) => SEND_TO_CHANNEL_TIMEOUT,
   |                                       ^^^^^^^^^^^^^^^^ could not find `SendTimeoutError` in `error`

error[E0433]: failed to resolve: could not find `SendTimeoutError` in `error`
  --> C:\Users\****\.cargo\registry\src\github.com-1ecc6299db9ec823\rust-tdlib-0.4.0\src\errors.rs:76:39
   |
76 |             tokio::sync::mpsc::error::SendTimeoutError::Closed(_) => CLOSED_CHANNEL_ERROR,
   |                                       ^^^^^^^^^^^^^^^^ could not find `SendTimeoutError` in `error`

error[E0425]: cannot find function `spawn` in crate `tokio`
   --> C:\Users\****\.cargo\registry\src\github.com-1ecc6299db9ec823\rust-tdlib-0.4.0\src\client\worker.rs:336:16
    |
336 |         tokio::spawn(async move {
    |                ^^^^^ not found in `tokio`
    |
help: consider importing this function
    |
2   | use std::thread::spawn;
    |
help: if you import `spawn`, refer to it directly
    |
336 -         tokio::spawn(async move {
336 +         spawn(async move {
    | 

error[E0425]: cannot find function `spawn` in crate `tokio`
   --> C:\Users\****\.cargo\registry\src\github.com-1ecc6299db9ec823\rust-tdlib-0.4.0\src\client\worker.rs:363:16
    |
363 |         tokio::spawn(async move {
    |                ^^^^^ not found in `tokio`
    |
help: consider importing this function
    |
2   | use std::thread::spawn;
    |
help: if you import `spawn`, refer to it directly
    |
363 -         tokio::spawn(async move {
363 +         spawn(async move {
    | 

error[E0425]: cannot find function `spawn` in crate `tokio`
   --> C:\Users\****\.cargo\registry\src\github.com-1ecc6299db9ec823\rust-tdlib-0.4.0\src\client\worker.rs:410:16
    |
410 |         tokio::spawn(async move {
    |                ^^^^^ not found in `tokio`
    |
help: consider importing this function
    |
2   | use std::thread::spawn;
    |
help: if you import `spawn`, refer to it directly
    |
410 -         tokio::spawn(async move {
410 +         spawn(async move {
    | 

error[E0412]: cannot find type `SendTimeoutError` in module `tokio::sync::mpsc::error`
  --> C:\Users\****\.cargo\registry\src\github.com-1ecc6299db9ec823\rust-tdlib-0.4.0\src\errors.rs:72:40
   |
72 | impl<T> From<tokio::sync::mpsc::error::SendTimeoutError<T>> for Error {
   |                                        ^^^^^^^^^^^^^^^^ not found in `tokio::sync::mpsc::error`

error[E0412]: cannot find type `SendTimeoutError` in module `tokio::sync::mpsc::error`
  --> C:\Users\****\.cargo\registry\src\github.com-1ecc6299db9ec823\rust-tdlib-0.4.0\src\errors.rs:73:44
   |
73 |     fn from(err: tokio::sync::mpsc::error::SendTimeoutError<T>) -> Self {
   |                                            ^^^^^^^^^^^^^^^^ not found in `tokio::sync::mpsc::error`

error[E0207]: the type parameter `T` is not constrained by the impl trait, self type, or predicates
  --> C:\Users\****\.cargo\registry\src\github.com-1ecc6299db9ec823\rust-tdlib-0.4.0\src\errors.rs:72:6
   |
72 | impl<T> From<tokio::sync::mpsc::error::SendTimeoutError<T>> for Error {
   |      ^ unconstrained type parameter

error: aborting due to 10 previous errors

Some errors have detailed explanations: E0207, E0412, E0425, E0432, E0433.
For more information about an error, try `rustc --explain E0207`.
error: could not compile `rust-tdlib` due to 11 previous errors
Process finished with exit code 101

tokio concurrency with Client

Hello,

I'm having an issue running concurrent instances of Client.

Here is the general control flow of my application:

let list_of_chats: Vec<&str> = vec!["chat_1", "chat_2", ...];

    // let (sender, mut receiver) = tokio::sync::mpsc::channel::<Box<Update>>(10000);

    // Process all of this concurrently
    let mut list_of_futures = FuturesUnordered::new();

    for chat in list_of_chats {
        let client = Client::builder()
            .with_tdlib_parameters(
                TdlibParameters::builder()
                    .database_directory(chat)
                    .use_test_dc(false)
                    .api_id(std::env::var("API_ID").unwrap().parse::<i32>().unwrap())
                    .api_hash(std::env::var("API_HASH").unwrap())
                    .system_language_code("en")
                    .device_model("Desktop")
                    .system_version("Unknown")
                    .application_version(env!("CARGO_PKG_VERSION"))
                    .enable_storage_optimizer(true)
                    .build(),
            )
            // .with_updates_sender(sender)
            .build()
            .unwrap();

        let mut worker = Worker::builder().build().unwrap();

        worker.start();
    
        let client = worker.bind_client(client).await.unwrap();
    
        loop {
            if worker.wait_client_state(&client).await.unwrap() == ClientState::Opened {
                log::info!("client authorized");
                break;
            }
        }

        let i_s = pull_sources_from_channel_name(client.to_owned(), club);
        list_of_futures.push(i_s);

        client.stop().await.unwrap();

        loop {
            if worker.wait_client_state(&client).await.unwrap() == ClientState::Closed {
                log::info!("client1 closed");
                break;
            }
        }

        worker.stop();

    }

    while let Some(status_result) = list_of_futures.next().await {
        log::info!("{:#?}", status_result)
    }

When I run this with my API_ID and API_HASH, I get the following error:

[ 0][t 0][1677184963.310343980][Client.cpp:282] Receive must not be called simultaneously from two different threads, but this has just happened. Call it from a fixed thread, dedicated for updates and response processing.

What I'm getting from this message is that the receive method on the original Client binding can only be run on one thread, but is it possible to send requests concurrently and merely receive them blocked?

Otherwise, I really love this library and I prefer it so much to the Python implementation!

Keep up the good work, y'all!! <3

Inability to handle authentication errors and change the authentication flow

Correct me if I'm wrong, but with the current API it doesn't seem to be a way to handle errors when an authentication error occurs while in Worker::auth_client(). I know that I can make a custom AuthStateHandler, but I still can't find a way to detect for example when a wrong confirmation code is inserted.

Also, another thing that I would like from the API is the ability to change the phone number after I inserted one while authenticating. This is similar to e.g. Telegram Desktop that you can change the phone number after you inserted one (e.g after you notice you inserted the wrong one).

Btw great job with the project!

libtdjson Memory Leak

When I run my application, at the beginning it uses like 18MB, but it increases infinitely.
In a day it reaches 150MB

I don't know it's tdlib bindings issue or libtdjson itself.

I have checked it with heaptrack and it shows me that "Leak" comes from libtdjson but I am not sure.

Does anyone has idea how to find out what's going on and fix it somehow?
Maybe someone else has the same problem?

Program ends before file is uploaded

If I try to upload a file right before the end of the program, the file is unable to be uploaded before the program ends. If I add some sleep time, then the file gets through. What I am aiming to figure out now is how I would keep the program from ending before the file is uploaded, without sleeping for an arbitrary amount of time, hoping the file is uploaded before then.
With the following code, the chosen file doesn't upload in time:

      let send_file = client1                        
          .send_message(                                                                     
              SendMessage::builder()                                    
              .chat_id(saved_messages.id())                       
              .input_message_content(InputMessageContent::InputMessageDocument(               
                      InputMessageDocument::builder()          
                      .document(InputFile::Local(InputFileLocal::builder().path("/path/to/file").build())).caption(FormattedText::builder().text("hi").build()) 
                      .build()                                                                
                      )))                                  
          .await                                                    
          .unwrap();                                                                          
                                                                                   
      std::thread::sleep(std::time::Duration::from_secs(5));                                                                                       
      client1.stop().await.unwrap();                                                          
      client1_state.await.unwrap();                                                           
      worker.stop();                                                                          
      waiter.await.unwrap();

With the following code, the file (couple hundred kb in size) gets through, the only difference being the addition of 5 seconds of sleep:

      let send_file = client1                              
          .send_message(                                                                      
              SendMessage::builder()                                    
              .chat_id(saved_messages.id())                        
              .input_message_content(InputMessageContent::InputMessageDocument(               
                      InputMessageDocument::builder()          
                      .document(InputFile::Local(InputFileLocal::builder().path("/path/to/file").build())) 
                      .caption(FormattedText::builder().text("hi").build()) 
                      .build()                                                                
                      )))                                 
          .await                                                    
          .unwrap();                                                                          
                                                                                   
      std::thread::sleep(std::time::Duration::from_secs(5));                                                                                       
      client1.stop().await.unwrap();                                                          
      client1_state.await.unwrap();                                                           
      worker.stop();                                                                          
  waiter.await.unwrap();

Again, I would like to avoid sleeping for an arbitrary amount of time, and optimally have the program block while its uploading, and then continue when the file has uploaded, but I am not sure how to go about this. Thanks in advance.

Use autogenerated tdlib libraries to enable CI

Hi, I saw you disabled the CI steps in https://github.com/aCLr/rust-tdlib/blob/master/.github/workflows/rust.yml because of "tests disables in case of unavailable tdlib =(".

I just made a github action flow that compiles tdlib, it's at https://github.com/dorak88783/tdlib-builder. If you want you can use this to get a tdlib library available to run the tests. I have it working in a private repo. If you like this idea/flow I can try to make it work in this repo and make PR. What do you think?

Examples not working

Hi, been trying to use this crate and tried the examples but they seem to not work.

main:

ERROR rust_tdlib::client::worker] error received and possibly cannot be handled because of empty state receiver: Error { extra: Some("cc916226-e85d-47d0-b466-1cfe391b54b7"), client_id: Some(1), code: 400, message: "Valid api_id must be provided. Can be obtained at https://my.telegram.org" }

handle_auth_state: seems stuck.

read_updates:

[2023-03-18T15:58:55Z ERROR rust_tdlib::client::worker] error received and possibly cannot be handled because of empty state receiver: Error { extra: Some("c78bc542-ed8e-4e92-b717-5e7854f6a5ea"), client_id: Some(1), code: 400, message: "Valid api_id must be provided. Can be obtained at https://my.telegram.org" }

The API_ID is passed and valid, I double checked and was able to use it with https://docs.telethon.dev/en/stable/ .
But I REALLY prefer rust over python, please help me not use python.

Be happy to try and PR something if you can point me to the right direction.

Error("invalid type: map, expected a string" updateUserFullInfo

rust-tdlib-0.4.1/src/client/worker.rs line 475

cannot deserialize to update: Error("invalid type: map, expected a string", line: 0, column: 0), data: "{\"@type\":\"updateUserFullInfo\",\"user_id\":777000,\"user_full_info\":{\"@type\":\"userFullInfo\",\"photo\":{\"@type\":\"chatPhoto\",\"id\":\"3337190045231025\",\"added_date\":1614855878,\"minithumbnail\":{\"@type\":\"minithumbnail\",\"width\":40,\"height\":40,\"data\":\"/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDACgcHiMeGSgjISMtKygwPGRBPDc3PHtYXUlkkYCZlo+AjIqgtObDoKrarYqMyP/L2u71////m8H////6/+b9//j/2wBDASstLTw1PHZBQXb4pYyl+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj4+Pj/wAARCAAoACgDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwB1FFFdRxhRT44Xk+6px69qkltjFFuZgTnoBS5lsVyu1yCiiimSAAJAJwPWrkcdtGu8sG9z/hVOipauVF26GghafnBSPt6tTL44jVfU023usAJJ07NTL1w0igEEAdqzUXzGrkuUr0UUVsYBRRRQAUUUUAFFFFAH/9k=\"},\"sizes\":[{\"@type\":\"photoSize\",\"type\":\"a\",\"photo\":{\"@type\":\"file\",\"id\":1627,\"size\":2941,\"expected_size\":2941,\"local\":{\"@type\":\"localFile\",\"path\":\"\",\"can_be_downloaded\":true,\"can_be_deleted\":false,\"is_downloading_active\":false,\"is_downloading_completed\":false,\"download_offset\":0,\"downloaded_prefix_size\":0,\"downloaded_size\":0},\"remote\":{\"@type\":\"remoteFile\",\"id\":\"AgACAgEAAxUAAWOceIKEyXUzOhNWPzFzL27DJtDzAAKxpzEbKNsLAAFOfk5Fp1s0KgEAAwIAA2EAAykE\",\"unique_id\":\"AQADsacxGyjbCwAC\",\"is_uploading_active\":false,\"is_uploading_completed\":true,\"uploaded_size\":2941}},\"width\":160,\"height\":160,\"progressive_sizes\":[]},{\"@type\":\"photoSize\",\"type\":\"b\",\"photo\":{\"@type\":\"file\",\"id\":1628,\"size\":6378,\"expected_size\":6378,\"local\":{\"@type\":\"localFile\",\"path\":\"\",\"can_be_downloaded\":true,\"can_be_deleted\":false,\"is_downloading_active\":false,\"is_downloading_completed\":false,\"download_offset\":0,\"downloaded_prefix_size\":0,\"downloaded_size\":0},\"remote\":{\"@type\":\"remoteFile\",\"id\":\"AgACAgEAAxUAAWOceIKEyXUzOhNWPzFzL27DJtDzAAKxpzEbKNsLAAFOfk5Fp1s0KgEAAwIAA2IAAykE\",\"unique_id\":\"AQADsacxGyjbCwABZw\",\"is_uploading_active\":false,\"is_uploading_completed\":true,\"uploaded_size\":6378}},\"width\":320,\"height\":320,\"progressive_sizes\":[]},{\"@type\":\"photoSize\",\"type\":\"c\",\"photo\":{\"@type\":\"file\",\"id\":1629,\"size\":14264,\"expected_size\":14264,\"local\":{\"@type\":\"localFile\",\"path\":\"\",\"can_be_downloaded\":true,\"can_be_deleted\":false,\"is_downloading_active\":false,\"is_downloading_completed\":false,\"download_offset\":0,\"downloaded_prefix_size\":0,\"downloaded_size\":0},\"remote\":{\"@type\":\"remoteFile\",\"id\":\"AgACAgEAAxUAAWOceIKEyXUzOhNWPzFzL27DJtDzAAKxpzEbKNsLAAFOfk5Fp1s0KgEAAwIAA2MAAykE\",\"unique_id\":\"AQADsacxGyjbCwABAQ\",\"is_uploading_active\":false,\"is_uploading_completed\":true,\"uploaded_size\":14264}},\"width\":640,\"height\":640,\"progressive_sizes\":[]}]},\"is_blocked\":false,\"can_be_called\":false,\"supports_video_calls\":false,\"has_private_calls\":false,\"has_private_forwards\":false,\"has_restricted_voice_and_video_note_messages\":false,\"need_phone_number_privacy_exception\":false,\"bio\":{\"@type\":\"formattedText\",\"text\":\"\",\"entities\":[]},\"premium_gift_options\":[],\"group_in_common_count\":0},\"@client_id\":1}"

How to get last 50 posts?

Hi!
Thank you for great crate!

But how to get last 50 posts?
I tried like this:

 let history = client.get_chat_history( 
   GetChatHistory::builder()
	 .chat_id(chat_id)
	 .limit(50)
	 .offset(-50)  // If set 50 - Error : Parameter offset must be non-positive
	 .from_message_id(0)
	 .build(), 
 )
 .await?;

But allways has got only 0 posts even in chats where thousands of posts ...

get_chats(): Can't deserialize tdlib data

Hello,

Thank you for the crate. I am getting this error when using get_chats.

let chats = client1
    .get_chats(GetChats::builder().limit(10).build())
    .await
    .unwrap();
 ERROR rust_tdlib::client::worker       > can't deserialize tdlib data: can't deserialize for updateSupergroupFullInfo with error: missing field `invite_link`
 ERROR rust_tdlib::client::worker       > can't deserialize tdlib data: can't deserialize for updateBasicGroupFullInfo with error: invalid type: map, expected a string
 ERROR rust_tdlib::client::worker       > can't deserialize tdlib data: can't deserialize for updateSupergroupFullInfo with error: invalid type: map, expected a string

unknown variant Json fail: Error("unknown variant `Chat`, expected one of `_Default`, `messageSenderChat`, `messageSenderUser`",

Hi! Thank you for the great crate!

I try to save/restore messages as json files.

serde = {version = "1", features = ["derive"]}
serde_json = "1"

                Update::NewMessage(new_message) => {
                      let message_json = serde_json::to_string(new_message.message()).expect("Can't serialize json");
                      let file_dir = "/tmp/test.json";
                      let mut file = File::create(file_dir).await?;
                      file.write_all(message_json.as_bytes()).await?;

                      let file = std::fs::File::open(file_dir).expect("Cant open file");
                      let mut reader = std::io::BufReader::new(file);
                      let read_message: Message = serde_json::from_reader(reader).expect("Json fail");
                }

Saved json looks good but the serde_json::from_reader throws error

Json fail: Error("unknown variantChat, expected one of _Default, messageSenderChat, messageSenderUser", line: 1, column: 77)

The same error for other updates for example Supergroup

Json fail: Error("unknown variant Member, expected one of _Default, chatMemberStatusAdministrator, chatMemberStatusBanned, chatMemberStatusCreator, chatMemberStatusLeft, chatMemberStatusMember, chatMemberStatusRestricted", line: 1, column: 118)

May be for successful deserializing your crate enums need something like #[serde(untagged)] like in this post ?

How to save/restore messages as json files?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.