File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -118,17 +118,15 @@ pub async fn webhook(
118118 if let Ok ( resp) = client. get ( url) . send ( ) . await {
119119 if !resp. status ( ) . is_success ( ) {
120120 warn ! ( status = %resp. status( ) , id = %file_id, "Telegram getFile failed" ) ;
121- continue ;
122121 } else if let Ok ( body) = resp. json :: < serde_json:: Value > ( ) . await {
123122 if let Some ( file_path) = body[ "result" ] [ "file_path" ] . as_str ( ) {
124123 // 2. Download the file
125124 let download_url = format ! ( "{TELEGRAM_API_BASE}/file/bot{token}/{file_path}" ) ;
126125 if let Ok ( r) = client. get ( download_url) . send ( ) . await {
127126 if !r. status ( ) . is_success ( ) {
128127 warn ! ( status = %r. status( ) , id = %file_id, "failed to download Telegram media" ) ;
129- continue ;
130- }
131- // Issue #690 review fix: Check file size before downloading
128+ } else {
129+ // Issue #690 review fix: Check file size before downloading
132130 let content_length = r
133131 . headers ( )
134132 . get ( "content-length" )
You can’t perform that action at this time.
0 commit comments