state_store: append user name to path when store_room_state
is called
This commit is contained in:
parent
c91263eb13
commit
631ad261ae
2 changed files with 2 additions and 7 deletions
|
@ -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(())
|
||||
}
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue