This repository has been archived on 2024-05-26. You can view files and clone it, but cannot push or open issues or pull requests.
core/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(())
}