diff --git a/src/base_client.rs b/src/base_client.rs index 1e09c887..c3372376 100644 --- a/src/base_client.rs +++ b/src/base_client.rs @@ -209,12 +209,6 @@ impl Client { *olm = Some(OlmMachine::new(&response.user_id, &response.device_id)?); } - if let Some(store) = self.state_store.as_ref() { - store - .store_client_state(ClientState::from_base_client(self)) - .await?; - } - Ok(()) } diff --git a/src/state/state_store.rs b/src/state/state_store.rs index e7f5e3ac..ef3eab1d 100644 --- a/src/state/state_store.rs +++ b/src/state/state_store.rs @@ -110,7 +110,8 @@ impl StateStore for JsonStore { async fn store_room_state(&self, room: &Room) -> Result<()> { if !self.user_path_set.load(Ordering::SeqCst) { - // TODO Error here, should the load methods also error? + self.user_path_set.swap(true, Ordering::SeqCst); + self.path.write().await.push(room.own_user_id.localpart()) } let mut path = self.path.read().await.clone();