state_store: append user name to path when `store_room_state` is called
parent
c91263eb13
commit
631ad261ae
|
@ -209,12 +209,6 @@ impl Client {
|
||||||
*olm = Some(OlmMachine::new(&response.user_id, &response.device_id)?);
|
*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(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -110,7 +110,8 @@ impl StateStore for JsonStore {
|
||||||
|
|
||||||
async fn store_room_state(&self, room: &Room) -> Result<()> {
|
async fn store_room_state(&self, room: &Room) -> Result<()> {
|
||||||
if !self.user_path_set.load(Ordering::SeqCst) {
|
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();
|
let mut path = self.path.read().await.clone();
|
||||||
|
|
Loading…
Reference in New Issue