mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-24 16:48:52 -04:00
state_store: append user name to path when store_room_state is called
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user