async_client: Don't assume that there are any state events.
This commit is contained in:
parent
39dd9280cb
commit
70dda32949
2 changed files with 2 additions and 2 deletions
|
@ -400,7 +400,7 @@ impl AsyncClient {
|
|||
}
|
||||
}
|
||||
|
||||
client.joined_rooms.get(&room_id).unwrap().clone()
|
||||
client.get_or_create_room(&room_id).clone()
|
||||
};
|
||||
|
||||
for event in &room.timeline.events {
|
||||
|
|
|
@ -250,7 +250,7 @@ impl Client {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
fn get_or_create_room(&mut self, room_id: &str) -> &mut Arc<RwLock<Room>> {
|
||||
pub(crate) fn get_or_create_room(&mut self, room_id: &str) -> &mut Arc<RwLock<Room>> {
|
||||
#[allow(clippy::or_fun_call)]
|
||||
self.joined_rooms
|
||||
.entry(room_id.to_string())
|
||||
|
|
Loading…
Reference in a new issue