From eef55632bbc4fc5f21bb5c49ee292b1800d7eb4e Mon Sep 17 00:00:00 2001 From: Olivier 'reivilibre Date: Tue, 23 Nov 2021 22:30:46 +0000 Subject: [PATCH] Add some minor debug prints --- src/main.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 356051c..c7f063c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -79,12 +79,12 @@ async fn main() -> anyhow::Result<()> { matrix_client: Arc::new(client.clone()), }; - eprintln!("Logging in!"); - if config.matrix_persist.exists() { + eprintln!("Restoring Matrix session..."); let session: Session = serde_json::from_reader(File::open(config.matrix_persist)?)?; client.restore_login(session).await?; } else { + eprintln!("Logging in!"); let session: Session = client .login( mxid.localpart(), @@ -94,6 +94,7 @@ async fn main() -> anyhow::Result<()> { ) .await? .into(); + eprintln!("Persisting Matrix session..."); serde_json::to_writer(File::create(config.matrix_persist)?, &session)?; }