fix: url icon (#4097)

This commit is contained in:
Nathan.fooo
2023-12-05 10:38:50 -08:00
committed by GitHub
parent 1a13de2ee9
commit 109ebaf989

View File

@ -41,9 +41,12 @@ pub fn user_profile_from_af_profile(
.metadata
.map(|m| {
(
m.get(USER_METADATA_ICON_URL).map(|v| v.to_string()),
m.get(USER_METADATA_OPEN_AI_KEY).map(|v| v.to_string()),
m.get(USER_METADATA_STABILITY_AI_KEY).map(|v| v.to_string()),
m.get(USER_METADATA_ICON_URL)
.map(|v| v.as_str().map(|s| s.to_string()).unwrap_or_default()),
m.get(USER_METADATA_OPEN_AI_KEY)
.map(|v| v.as_str().map(|s| s.to_string()).unwrap_or_default()),
m.get(USER_METADATA_STABILITY_AI_KEY)
.map(|v| v.as_str().map(|s| s.to_string()).unwrap_or_default()),
)
})
.unwrap_or_default()