Add some minor debug prints
continuous-integration/drone the build was successful
Details
continuous-integration/drone the build was successful
Details
This commit is contained in:
parent
d560b860bf
commit
eef55632bb
|
@ -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)?;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue