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.
2023-06-14 21:49:20 +00:00
|
|
|
mod ui;
|
2023-06-15 17:19:24 +00:00
|
|
|
mod accounts;
|
2023-06-14 21:49:20 +00:00
|
|
|
|
2023-06-15 19:57:43 +00:00
|
|
|
use matrix_sdk::ruma::exports::serde_json;
|
2023-06-15 17:19:24 +00:00
|
|
|
use tokio::time::{sleep, Duration};
|
2023-06-14 21:49:20 +00:00
|
|
|
|
2023-06-15 17:19:24 +00:00
|
|
|
#[tokio::main]
|
|
|
|
async fn main() -> anyhow::Result<()> {
|
|
|
|
tracing_subscriber::fmt::init();
|
|
|
|
|
2023-06-15 19:57:43 +00:00
|
|
|
// 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(())
|
|
|
|
}
|