This commit is contained in:
@@ -7,11 +7,11 @@ use std::collections::HashMap;
|
||||
|
||||
/// Get space hierarchy
|
||||
pub async fn hierarchy(client: MatrixClientExtractor) -> HttpResult {
|
||||
let spaces = client.client.client.joined_space_rooms();
|
||||
let space_service = SpaceService::new(client.client.client);
|
||||
let spaces = space_service.joined_spaces().await;
|
||||
let mut hierarchy = HashMap::new();
|
||||
for space in spaces {
|
||||
let rooms = space_service.space_room_list(space.room_id.to_owned());
|
||||
let rooms = space_service.space_room_list(space.room_id().to_owned());
|
||||
while !matches!(
|
||||
rooms.pagination_state(),
|
||||
SpaceRoomListPaginationState::Idle { end_reached: true }
|
||||
@@ -20,7 +20,7 @@ pub async fn hierarchy(client: MatrixClientExtractor) -> HttpResult {
|
||||
}
|
||||
|
||||
hierarchy.insert(
|
||||
space.room_id.to_owned(),
|
||||
space.room_id().to_owned(),
|
||||
rooms
|
||||
.rooms()
|
||||
.into_iter()
|
||||
|
||||
Reference in New Issue
Block a user