diff options
-rw-r--r-- | src/auth.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/auth.rs b/src/auth.rs index 1b9a63c..9417a0c 100644 --- a/src/auth.rs +++ b/src/auth.rs @@ -4,9 +4,9 @@ use tdlib_rs::{Client, Error}; use crate::client_ext::{ClientExt, AuthorizationState, TdlibParameters, PhoneNumberAuthenticationSettings}; fn make_lib_params() -> TdlibParameters { - let cache = env::current_dir().unwrap().join("cache").join("katya"); + let cache = env::current_dir().unwrap().join("cache").join(env::var("NAME").unwrap()); let make_path = |p: &str| cache.join(p).to_str().unwrap().to_owned(); - let use_test_dc = env::var("TEST_DC").unwrap() == "yes"; + let use_test_dc = false; if !use_test_dc { warn!("doin prod shit"); } @@ -70,6 +70,9 @@ pub async fn continue_auth(client: &Client, auth_state: AuthorizationState) -> R client.check_authentication_password(env::var("TG_PASS").unwrap()).await?; debug!("send passwd") } + AuthorizationState::AuthorizationStateReady => { + info!("!!!auth completed!!!"); + } _ => info!("auth state unknown: {:#?}", auth_state), } Ok(()) |