Mention video id when failing to send/upload video
This commit is contained in:
parent
8c2db3c958
commit
76dfd825f3
|
@ -679,34 +679,40 @@ pub async fn upload_worker(
|
|||
.mime_type("video/x-matroska")
|
||||
.file(uploaded);
|
||||
if let Err(err) = tclient.send_message(&chat, message).await {
|
||||
eprintln!("Failed to send video: {:?}", err);
|
||||
eprintln!("Failed to send video {}: {:?}", &video_id, err);
|
||||
if let Err(err) = tclient
|
||||
.send_message(
|
||||
&chat,
|
||||
InputMessage::text("Failed to send video, see logs"),
|
||||
InputMessage::text(&format!(
|
||||
"Failed to send video {}, see logs",
|
||||
&video_id
|
||||
)),
|
||||
)
|
||||
.await
|
||||
{
|
||||
eprintln!(
|
||||
"Failed to send message about failing to send video: {:?}",
|
||||
err
|
||||
"Failed to send message about failing to send video {}: {:?}",
|
||||
&video_id, err
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
Err(err) => {
|
||||
success = false;
|
||||
eprintln!("Failed to upload video: {:?}", err);
|
||||
eprintln!("Failed to upload video {}: {:?}", &video_id, err);
|
||||
if let Err(err) = tclient
|
||||
.send_message(
|
||||
&chat,
|
||||
InputMessage::text("Failed to upload video, see logs"),
|
||||
InputMessage::text(&format!(
|
||||
"Failed to upload video {}, see logs",
|
||||
&video_id
|
||||
)),
|
||||
)
|
||||
.await
|
||||
{
|
||||
eprintln!(
|
||||
"Failed to send message about failing to upload video: {:?}",
|
||||
err
|
||||
"Failed to send message about failing to upload video {}: {:?}",
|
||||
&video_id, err
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue