mod ui; mod accounts; use matrix_sdk::ruma::exports::serde_json; use tokio::time::{sleep, Duration}; #[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?; Ok(()) }