UploadContactProfilePhoto
---functions---
photos.uploadContactProfilePhoto#e14c4a71 suggest:flags.3?true save:flags.4?true user_id:InputUser file:flags.0?InputFile video:flags.1?InputFile video_start_ts:flags.2?double video_emoji_markup:flags.5?VideoSize = photos.Photo
Returns
Parameters
Example
Replace placeholder values with real data before running.
use ferogram::tl::functions;
use ferogram::tl::enums;
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let (client, _) = ferogram::Client::quick_connect(
"my.session",
12345,
"0123456789abcdef0123456789abcdef",
)
.await?;
let result = client
.invoke(
&functions::photos::UploadContactProfilePhoto {
suggest: false,
save: false,
user_id: enums::InputUser::Empty,
file: None,
video: None,
video_start_ts: None,
video_emoji_markup: None,
},
)
.await?;
println!("{result:?}");
Ok(())
}
use ferogram::tl::functions;
use ferogram::update::Update;
use ferogram::tl::enums;
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let (client, _) = ferogram::Client::quick_connect(
"my.session",
12345,
"0123456789abcdef0123456789abcdef",
)
.await?;
let mut stream = client.stream_updates();
while let Some(upd) = stream.next().await {
if let Update::NewMessage(_msg) = upd {
let result = client
.invoke(
&functions::photos::UploadContactProfilePhoto {
suggest: false,
save: false,
user_id: enums::InputUser::Empty,
file: None,
video: None,
video_start_ts: None,
video_emoji_markup: None,
},
)
.await?;
println!("{result:?}");
}
}
Ok(())
}