|
|
|
@ -81,9 +81,8 @@ async fn login_and_sync(
|
|
|
|
|
let mut client_builder = Client::builder().homeserver_url(homeserver_url);
|
|
|
|
|
|
|
|
|
|
// The location to save files to
|
|
|
|
|
let mut home = dirs::home_dir().expect("no home directory found");
|
|
|
|
|
home.push("party_bot");
|
|
|
|
|
let state_store = StateStore::open_with_path(home)?;
|
|
|
|
|
let proj_dirs = directories::ProjectDirs::from("de", "Entropia", "Matrix Rust Example Bot").unwrap();
|
|
|
|
|
let state_store = StateStore::open_with_path(proj_dirs.data_dir())?;
|
|
|
|
|
client_builder = client_builder.state_store(Box::new(state_store));
|
|
|
|
|
|
|
|
|
|
let client = client_builder.build().await.unwrap();
|
|
|
|
|