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()),
|
matrix_client: Arc::new(client.clone()),
|
||||||
};
|
};
|
||||||
|
|
||||||
eprintln!("Logging in!");
|
|
||||||
|
|
||||||
if config.matrix_persist.exists() {
|
if config.matrix_persist.exists() {
|
||||||
|
eprintln!("Restoring Matrix session...");
|
||||||
let session: Session = serde_json::from_reader(File::open(config.matrix_persist)?)?;
|
let session: Session = serde_json::from_reader(File::open(config.matrix_persist)?)?;
|
||||||
client.restore_login(session).await?;
|
client.restore_login(session).await?;
|
||||||
} else {
|
} else {
|
||||||
|
eprintln!("Logging in!");
|
||||||
let session: Session = client
|
let session: Session = client
|
||||||
.login(
|
.login(
|
||||||
mxid.localpart(),
|
mxid.localpart(),
|
||||||
|
@ -94,6 +94,7 @@ async fn main() -> anyhow::Result<()> {
|
||||||
)
|
)
|
||||||
.await?
|
.await?
|
||||||
.into();
|
.into();
|
||||||
|
eprintln!("Persisting Matrix session...");
|
||||||
serde_json::to_writer(File::create(config.matrix_persist)?, &session)?;
|
serde_json::to_writer(File::create(config.matrix_persist)?, &session)?;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue