mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-09-10 18:55:57 +03:00
Add avatar color support
The new web-vault v2023.1.0 supports a custom color for the avatar. https://github.com/bitwarden/server/pull/2330 This PR adds this feature.
This commit is contained in:
@@ -46,6 +46,8 @@ db_object! {
|
||||
pub client_kdf_iter: i32,
|
||||
|
||||
pub api_key: Option<String>,
|
||||
|
||||
pub avatar_color: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Identifiable, Queryable, Insertable)]
|
||||
@@ -113,6 +115,8 @@ impl User {
|
||||
client_kdf_iter: Self::CLIENT_KDF_ITER_DEFAULT,
|
||||
|
||||
api_key: None,
|
||||
|
||||
avatar_color: None,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -226,6 +230,7 @@ impl User {
|
||||
"Providers": [],
|
||||
"ProviderOrganizations": [],
|
||||
"ForcePasswordReset": false,
|
||||
"AvatarColor": self.avatar_color,
|
||||
"Object": "profile",
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user