1
0
Fork 0
trinitrix/src/main.rs

20 lines
644 B
Rust
Raw Normal View History

2023-06-14 21:49:20 +00:00
mod ui;
mod accounts;
2023-06-14 21:49:20 +00:00
use matrix_sdk::ruma::exports::serde_json;
use tokio::time::{sleep, Duration};
2023-06-14 21:49:20 +00:00
#[tokio::main]
async fn main() -> anyhow::Result<()> {
tracing_subscriber::fmt::init();
// accounts::account_add("https://nerdcult.net", "test", "abcd1234").await?;
let serialized_account = "{\"homeserver\":\"https://nerdcult.net\",\"session\":{\"access_token\":\"U2XH1vfu3dJTTPV7BIeZh2yGiMN49vBF\",\"user_id\":\"@test:nerdcult.net\",\"device_id\":\"UsdqFbcEC3\"},\"sync_token\":null}";
let account: accounts::Account = serde_json::from_str(serialized_account)?;
accounts::account_login(account).await?;
2023-06-14 21:49:20 +00:00
Ok(())
}