From 21ac5bfc2944c661a1a1a3d86600125c565ce2d0 Mon Sep 17 00:00:00 2001 From: Nyaaori <+@nyaaori.cat> Date: Sun, 1 Jan 2023 23:07:36 +0100 Subject: [PATCH] fix: whoops --- src/service/rooms/state_cache/mod.rs | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/service/rooms/state_cache/mod.rs b/src/service/rooms/state_cache/mod.rs index dfbe5db7..7474bc98 100644 --- a/src/service/rooms/state_cache/mod.rs +++ b/src/service/rooms/state_cache/mod.rs @@ -47,7 +47,7 @@ impl Service { || (services().users.blurhash(user_id)? != membership_event.blurhash)) && (membership != MembershipState::Leave) { - let response = services() + if let Ok(response) = services() .sending .send_federation_request( user_id.server_name(), @@ -56,14 +56,16 @@ impl Service { field: Some(ProfileField::AvatarUrl), }, ) - .await?; - let _ = services() - .users - .set_displayname(user_id, response.displayname.clone()); - let _ = services() - .users - .set_avatar_url(user_id, response.avatar_url); - let _ = services().users.set_blurhash(user_id, response.blurhash); + .await + { + let _ = services() + .users + .set_displayname(user_id, response.displayname.clone()); + let _ = services() + .users + .set_avatar_url(user_id, response.avatar_url); + let _ = services().users.set_blurhash(user_id, response.blurhash); + } }; }