From 8e27d74c4acd380e943db1a038b12b1fd9e9bcfa Mon Sep 17 00:00:00 2001 From: Ginger Date: Sun, 14 Sep 2025 15:53:05 -0400 Subject: [PATCH] fix: Slightly more parallelism --- src/api/client/profile.rs | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/api/client/profile.rs b/src/api/client/profile.rs index 0b291db7..e83e747c 100644 --- a/src/api/client/profile.rs +++ b/src/api/client/profile.rs @@ -1,5 +1,3 @@ -use std::collections::BTreeMap; - use axum::extract::State; use conduwuit::{ Err, Result, @@ -10,7 +8,7 @@ use conduwuit::{ use conduwuit_service::Services; use futures::{ StreamExt, TryStreamExt, - future::{join, join3}, + future::{join, join3, join4}, }; use ruma::{ OwnedMxcUri, OwnedRoomId, UserId, @@ -285,16 +283,11 @@ pub(crate) async fn get_profile_route( return Err!(Request(NotFound("Profile was not found."))); } - let custom_profile_fields: BTreeMap = services - .users - .all_profile_keys(&body.user_id) - .collect() - .await; - - let (avatar_url, blurhash, displayname) = join3( + let (avatar_url, blurhash, displayname, custom_profile_fields) = join4( services.users.avatar_url(&body.user_id).ok(), services.users.blurhash(&body.user_id).ok(), services.users.displayname(&body.user_id).ok(), + services.users.all_profile_keys(&body.user_id).collect(), ) .await;