break out the via field for hierarchy requests

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-04-21 23:55:09 -04:00 committed by June
parent 8a767c4b10
commit 311be20055

View file

@ -625,16 +625,13 @@ impl Service {
&self, sender_user: &UserId, room_id: &RoomId, limit: usize, skip: usize, max_depth: usize,
suggested_only: bool,
) -> Result<client::space::get_hierarchy::v1::Response> {
let via = match room_id.server_name() {
Some(server_name) => vec![server_name.to_owned()],
None => vec![],
};
match self
.get_summary_and_children_client(
&room_id.to_owned(),
suggested_only,
sender_user,
&match room_id.server_name() {
Some(server_name) => vec![server_name.into()],
None => vec![],
},
)
.get_summary_and_children_client(&room_id.to_owned(), suggested_only, sender_user, &via)
.await?
{
Some(SummaryAccessibility::Accessible(summary)) => {