partially revert keeping track of remote user profiles
this seems to require some more work to properly ignore dead server errors without breaking the entire room join Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
149d22eef7
commit
2b031e40a2
3 changed files with 13 additions and 3 deletions
|
@ -127,6 +127,8 @@ pub async fn get_displayname_route(
|
|||
)
|
||||
.await?;
|
||||
|
||||
/*
|
||||
TODO: ignore errors properly?
|
||||
// Create and update our local copy of the user
|
||||
// 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
|
||||
|
@ -143,6 +145,7 @@ pub async fn get_displayname_route(
|
|||
.users
|
||||
.set_blurhash(&body.user_id, response.blurhash)
|
||||
.await;
|
||||
*/
|
||||
|
||||
return Ok(get_display_name::v3::Response {
|
||||
displayname: response.displayname,
|
||||
|
@ -271,6 +274,8 @@ pub async fn get_avatar_url_route(
|
|||
)
|
||||
.await?;
|
||||
|
||||
/*
|
||||
TODO: ignore errors properly?
|
||||
// Create and update our local copy of the user
|
||||
// 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
|
||||
|
@ -287,6 +292,7 @@ pub async fn get_avatar_url_route(
|
|||
.users
|
||||
.set_blurhash(&body.user_id, response.blurhash.clone())
|
||||
.await;
|
||||
*/
|
||||
|
||||
return Ok(get_avatar_url::v3::Response {
|
||||
avatar_url: response.avatar_url,
|
||||
|
@ -323,6 +329,8 @@ pub async fn get_profile_route(
|
|||
)
|
||||
.await?;
|
||||
|
||||
/*
|
||||
TODO: ignore errors properly?
|
||||
// Create and update our local copy of the user
|
||||
// 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
|
||||
|
@ -339,6 +347,7 @@ pub async fn get_profile_route(
|
|||
.users
|
||||
.set_blurhash(&body.user_id, response.blurhash.clone())
|
||||
.await;
|
||||
*/
|
||||
|
||||
return Ok(get_profile::v3::Response {
|
||||
displayname: response.displayname,
|
||||
|
|
|
@ -4,7 +4,6 @@ use std::{collections::HashSet, sync::Arc};
|
|||
pub use data::Data;
|
||||
|
||||
use ruma::{
|
||||
api::federation::{self, query::get_profile_information::v1::ProfileField},
|
||||
events::{
|
||||
direct::DirectEvent,
|
||||
ignored_user_list::IgnoredUserListEvent,
|
||||
|
@ -42,7 +41,9 @@ impl Service {
|
|||
// Keep track what remote users exist by adding them as "deactivated" users
|
||||
if user_id.server_name() != services().globals.server_name() {
|
||||
services().users.create(user_id, None)?;
|
||||
/*
|
||||
// Try to update our local copy of the user if ours does not match
|
||||
// TODO: ignore errors properly?
|
||||
if ((services().users.displayname(user_id)? != membership_event.displayname)
|
||||
|| (services().users.avatar_url(user_id)? != membership_event.avatar_url)
|
||||
|| (services().users.blurhash(user_id)? != membership_event.blurhash))
|
||||
|
@ -71,6 +72,7 @@ impl Service {
|
|||
.set_blurhash(user_id, response.blurhash)
|
||||
.await;
|
||||
};
|
||||
*/
|
||||
}
|
||||
|
||||
match &membership {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue