diff --git a/src/api/client_server/profile.rs b/src/api/client_server/profile.rs index 53389143..e61c4f0e 100644 --- a/src/api/client_server/profile.rs +++ b/src/api/client_server/profile.rs @@ -127,16 +127,18 @@ pub async fn get_displayname_route( .await?; // Create and update our local copy of the user - services().users.create(&body.user_id, None)?; - services() + // these are `let _` because it's fine if we can't find these for the user. + // also these requests are sent on room join so dead servers will make room joins annoying again + let _ = services().users.create(&body.user_id, None); + let _ = services() .users - .set_displayname(&body.user_id, response.displayname.clone())?; - services() + .set_displayname(&body.user_id, response.displayname.clone()); + let _ = services() .users - .set_avatar_url(&body.user_id, response.avatar_url)?; - services() + .set_avatar_url(&body.user_id, response.avatar_url); + let _ = services() .users - .set_blurhash(&body.user_id, response.blurhash)?; + .set_blurhash(&body.user_id, response.blurhash); return Ok(get_display_name::v3::Response { displayname: response.displayname, @@ -264,16 +266,18 @@ pub async fn get_avatar_url_route( .await?; // Create and update our local copy of the user - services().users.create(&body.user_id, None)?; - services() + // these are `let _` because it's fine if we can't find these for the user. + // also these requests are sent on room join so dead servers will make room joins annoying again + let _ = services().users.create(&body.user_id, None); + let _ = services() .users - .set_displayname(&body.user_id, response.displayname)?; - services() + .set_displayname(&body.user_id, response.displayname); + let _ = services() .users - .set_avatar_url(&body.user_id, response.avatar_url.clone())?; - services() + .set_avatar_url(&body.user_id, response.avatar_url.clone()); + let _ = services() .users - .set_blurhash(&body.user_id, response.blurhash.clone())?; + .set_blurhash(&body.user_id, response.blurhash.clone()); return Ok(get_avatar_url::v3::Response { avatar_url: response.avatar_url, @@ -311,16 +315,18 @@ pub async fn get_profile_route( .await?; // Create and update our local copy of the user - services().users.create(&body.user_id, None)?; - services() + // these are `let _` because it's fine if we can't find these for the user. + // also these requests are sent on room join so dead servers will make room joins annoying again + let _ = services().users.create(&body.user_id, None); + let _ = services() .users - .set_displayname(&body.user_id, response.displayname.clone())?; - services() + .set_displayname(&body.user_id, response.displayname.clone()); + let _ = services() .users - .set_avatar_url(&body.user_id, response.avatar_url.clone())?; - services() + .set_avatar_url(&body.user_id, response.avatar_url.clone()); + let _ = services() .users - .set_blurhash(&body.user_id, response.blurhash.clone())?; + .set_blurhash(&body.user_id, response.blurhash.clone()); return Ok(get_profile::v3::Response { displayname: response.displayname,