mirror of
https://framagit.org/veretcle/scootaloo.git
synced 2025-07-20 17:11:19 +02:00
feat: note inside copyprofile
This commit is contained in:
11
src/lib.rs
11
src/lib.rs
@@ -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);
|
||||
|
Reference in New Issue
Block a user