feat: note inside copyprofile

This commit is contained in:
VC
2022-12-12 13:38:52 +01:00
parent 3645728ddf
commit 87797c7ab0
2 changed files with 101 additions and 4 deletions

View File

@@ -263,6 +263,13 @@ pub async fn profile(config: Config, bot: Option<bool>) {
.user
.ok_or_else(|| ScootalooError::new("No user in Tweet!"))?;
let note = get_note_from_description(
&twitter_user.description,
&twitter_user.entities.description.urls,
);
let fields_attributes = get_attribute_from_url(&twitter_user.entities.url);
let display_name = Some(String::from_utf16_lossy(
&twitter_user
.name
@@ -280,7 +287,7 @@ pub async fn profile(config: Config, bot: Option<bool>) {
discoverable: None,
bot,
display_name,
note: twitter_user.description,
note,
avatar: Some(
base64_media(&twitter_user.profile_image_url_https.replace("_normal", ""))
.await?,
@@ -288,7 +295,7 @@ pub async fn profile(config: Config, bot: Option<bool>) {
header,
locked: None,
source: None,
fields_attributes: None,
fields_attributes,
};
let mastodon = get_mastodon_token(&mastodon_config);