diff --git a/DIFFERENCES.md b/DIFFERENCES.md index fd987363..fb36a07e 100644 --- a/DIFFERENCES.md +++ b/DIFFERENCES.md @@ -41,7 +41,6 @@ - Send a User-Agent on all of our requests (`conduwuit/0.7.0-alpha+conduwuit-0.1.1`) which strangely was not done upstream since forever. Some providers consider no User-Agent suspicious and block said requests. - Safer and cleaner shutdowns on both database side as we run cleanup on shutdown and exits database loop better (no potential hanging issues in database loop), overall cleaner shutdown logic - Basic binary commands like `conduwuit --version` work (interested in expanding it more) -- Keep track of remote user profiles for profile directory (user profile searching) and local requests for remote profiles (via upstream MR with changes) - Allow HEAD HTTP requests in CORS for clients (despite not being explicity mentioned in Matrix spec, HTTP spec says all HEAD requests need to behave the same as GET requests, Synapse supports HEAD requests) - Bump MSRV to 1.74.1 - Purge unmaintained/irrelevant/broken database backends (heed, sled, persy) @@ -50,4 +49,4 @@ - Prevent admin credential commands like reset password and deactivate user from modifying non-local users (https://gitlab.com/famedly/conduit/-/issues/377) - Fixed spec compliance issue with room version 8 - 11 joins (https://github.com/matrix-org/synapse/issues/16717 / https://github.com/matrix-org/matrix-spec/issues/1708) - Add basic cache eviction for true destinations when requests fail if we use a cached destination (e.g. a server has modified their well-known and we're still connecting to the old destination) -- Only follow 6 redirects total in our default reqwest ClientBuilder \ No newline at end of file +- Only follow 6 redirects total in our default reqwest ClientBuilder diff --git a/src/api/client_server/profile.rs b/src/api/client_server/profile.rs index 019177f5..e80459f1 100644 --- a/src/api/client_server/profile.rs +++ b/src/api/client_server/profile.rs @@ -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, diff --git a/src/service/rooms/state_cache/mod.rs b/src/service/rooms/state_cache/mod.rs index b7cd04a6..546767a9 100644 --- a/src/service/rooms/state_cache/mod.rs +++ b/src/service/rooms/state_cache/mod.rs @@ -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 {