fix: fields_attribute is busted so 🤷

This commit is contained in:
VC
2022-12-12 15:15:12 +01:00
parent 88b73f4bc5
commit 90f47079d9
2 changed files with 3 additions and 2 deletions

View File

@@ -268,7 +268,7 @@ pub async fn profile(config: Config, bot: Option<bool>) {
&twitter_user.entities.description.urls, &twitter_user.entities.description.urls,
); );
let fields_attributes = get_attribute_from_url(&twitter_user.entities.url); // let fields_attributes = get_attribute_from_url(&twitter_user.entities.url);
let display_name = Some(String::from_utf16_lossy( let display_name = Some(String::from_utf16_lossy(
&twitter_user &twitter_user
@@ -295,7 +295,7 @@ pub async fn profile(config: Config, bot: Option<bool>) {
header, header,
locked: None, locked: None,
source: None, source: None,
fields_attributes, fields_attributes: None,
}; };
let mastodon = get_mastodon_token(&mastodon_config); let mastodon = get_mastodon_token(&mastodon_config);

View File

@@ -141,6 +141,7 @@ pub fn get_note_from_description(t: &Option<String>, urls: &[UrlEntity]) -> Opti
} }
/// Gets fields_attribute from UserEntityDetail /// Gets fields_attribute from UserEntityDetail
#[allow(dead_code)]
pub fn get_attribute_from_url( pub fn get_attribute_from_url(
user_entity_detail: &Option<UserEntityDetail>, user_entity_detail: &Option<UserEntityDetail>,
) -> Option<Vec<CredentialsFieldAttribute>> { ) -> Option<Vec<CredentialsFieldAttribute>> {