summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsyn <isaqtm@gmail.com>2021-01-16 02:51:40 +0300
committersyn <isaqtm@gmail.com>2021-01-16 02:51:40 +0300
commit094b3b3e4ff6df5eb084f5f232a42424b7a8432c (patch)
treee984eef7aba086c3a4e806e9eaf2ec55db3238b3
parentf8a121f078206594754ce79be674ced3f40635b7 (diff)
downloadairception-094b3b3e4ff6df5eb084f5f232a42424b7a8432c.tar.gz
change env keys
-rw-r--r--src/auth.rs7
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(())