mirror of
https://github.com/girlbossceo/conduwuit.git
synced 2024-11-27 02:45:27 +00:00
ignore potential errors when updating user profiles
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
4d410d7304
commit
9ec1532580
|
@ -127,16 +127,18 @@ pub async fn get_displayname_route(
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
// Create and update our local copy of the user
|
// Create and update our local copy of the user
|
||||||
services().users.create(&body.user_id, None)?;
|
// these are `let _` because it's fine if we can't find these for the user.
|
||||||
services()
|
// 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
|
.users
|
||||||
.set_displayname(&body.user_id, response.displayname.clone())?;
|
.set_displayname(&body.user_id, response.displayname.clone());
|
||||||
services()
|
let _ = services()
|
||||||
.users
|
.users
|
||||||
.set_avatar_url(&body.user_id, response.avatar_url)?;
|
.set_avatar_url(&body.user_id, response.avatar_url);
|
||||||
services()
|
let _ = services()
|
||||||
.users
|
.users
|
||||||
.set_blurhash(&body.user_id, response.blurhash)?;
|
.set_blurhash(&body.user_id, response.blurhash);
|
||||||
|
|
||||||
return Ok(get_display_name::v3::Response {
|
return Ok(get_display_name::v3::Response {
|
||||||
displayname: response.displayname,
|
displayname: response.displayname,
|
||||||
|
@ -264,16 +266,18 @@ pub async fn get_avatar_url_route(
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
// Create and update our local copy of the user
|
// Create and update our local copy of the user
|
||||||
services().users.create(&body.user_id, None)?;
|
// these are `let _` because it's fine if we can't find these for the user.
|
||||||
services()
|
// 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
|
.users
|
||||||
.set_displayname(&body.user_id, response.displayname)?;
|
.set_displayname(&body.user_id, response.displayname);
|
||||||
services()
|
let _ = services()
|
||||||
.users
|
.users
|
||||||
.set_avatar_url(&body.user_id, response.avatar_url.clone())?;
|
.set_avatar_url(&body.user_id, response.avatar_url.clone());
|
||||||
services()
|
let _ = services()
|
||||||
.users
|
.users
|
||||||
.set_blurhash(&body.user_id, response.blurhash.clone())?;
|
.set_blurhash(&body.user_id, response.blurhash.clone());
|
||||||
|
|
||||||
return Ok(get_avatar_url::v3::Response {
|
return Ok(get_avatar_url::v3::Response {
|
||||||
avatar_url: response.avatar_url,
|
avatar_url: response.avatar_url,
|
||||||
|
@ -311,16 +315,18 @@ pub async fn get_profile_route(
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
// Create and update our local copy of the user
|
// Create and update our local copy of the user
|
||||||
services().users.create(&body.user_id, None)?;
|
// these are `let _` because it's fine if we can't find these for the user.
|
||||||
services()
|
// 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
|
.users
|
||||||
.set_displayname(&body.user_id, response.displayname.clone())?;
|
.set_displayname(&body.user_id, response.displayname.clone());
|
||||||
services()
|
let _ = services()
|
||||||
.users
|
.users
|
||||||
.set_avatar_url(&body.user_id, response.avatar_url.clone())?;
|
.set_avatar_url(&body.user_id, response.avatar_url.clone());
|
||||||
services()
|
let _ = services()
|
||||||
.users
|
.users
|
||||||
.set_blurhash(&body.user_id, response.blurhash.clone())?;
|
.set_blurhash(&body.user_id, response.blurhash.clone());
|
||||||
|
|
||||||
return Ok(get_profile::v3::Response {
|
return Ok(get_profile::v3::Response {
|
||||||
displayname: response.displayname,
|
displayname: response.displayname,
|
||||||
|
|
Loading…
Reference in a new issue