refactor: Fix errors in api/client/profile.rs and api/client/unstable.rs

This commit is contained in:
Ginger
2026-04-11 13:56:15 -04:00
parent 69d33931fa
commit 1bf6d2a117
7 changed files with 342 additions and 708 deletions
+11 -1
View File
@@ -1274,7 +1274,6 @@ impl Service {
profile_key: &str,
profile_key_value: Option<serde_json::Value>,
) {
// TODO: insert to the stable MSC4175 key when it's stable
let key = (user_id, profile_key);
if let Some(value) = profile_key_value {
@@ -1284,6 +1283,17 @@ impl Service {
}
}
/// Clears all profile data for a user, including display name and avatar
/// url.
pub async fn clear_profile(&self, user_id: &UserId) {
self.set_displayname(user_id, None);
self.set_avatar_url(user_id, None);
self.set_blurhash(user_id, None);
self.all_profile_keys(user_id)
.ready_for_each(|(key, _)| self.set_profile_key(user_id, &key, None))
.await;
}
#[cfg(feature = "ldap")]
async fn create_ldap_connection(
config: &conduwuit_core::config::LdapConfig,