From ae306e4fb788e312229d97c318e4cf9895095c4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D1=8B=D1=80=D1=86=D0=B5=D0=B2=20=D0=92=D0=B0=D0=B4?= =?UTF-8?q?=D0=B8=D0=BC=20=D0=98=D0=B3=D0=BE=D1=80=D0=B5=D0=B2=D0=B8=D1=87?= Date: Tue, 11 Jun 2024 18:59:19 +0300 Subject: [PATCH] Rename thumb to thumbnail (in missed constructor params) --- crates/teloxide-core/src/types/inline_query_result.rs | 4 ++++ crates/teloxide-core/src/types/inline_query_result_photo.rs | 4 ++-- crates/teloxide-core/src/types/inline_query_result_video.rs | 4 ++-- crates/teloxide-core/src/types/message.rs | 6 +++--- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/crates/teloxide-core/src/types/inline_query_result.rs b/crates/teloxide-core/src/types/inline_query_result.rs index fa39d603..4a4c07b9 100644 --- a/crates/teloxide-core/src/types/inline_query_result.rs +++ b/crates/teloxide-core/src/types/inline_query_result.rs @@ -522,6 +522,7 @@ mod tests { gif_height: None, gif_duration: None, thumbnail_url: Url::parse("http://thumb_url/").unwrap(), + thumbnail_mime_type: None, title: None, caption: None, parse_mode: None, @@ -546,6 +547,7 @@ mod tests { gif_height: Some(1), gif_duration: Some(Seconds::from_seconds(1)), thumbnail_url: Url::parse("http://thumb_url/").unwrap(), + thumbnail_mime_type: None, title: Some(String::from("title")), caption: Some(String::from("caption")), parse_mode: Some(ParseMode::Html), @@ -620,6 +622,7 @@ mod tests { mpeg4_height: None, mpeg4_duration: None, thumbnail_url: Url::parse("http://thumb_url/").unwrap(), + thumbnail_mime_type: None, title: None, caption: None, parse_mode: None, @@ -644,6 +647,7 @@ mod tests { mpeg4_height: Some(1), mpeg4_duration: Some(Seconds::from_seconds(1)), thumbnail_url: Url::parse("http://thumb_url/").unwrap(), + thumbnail_mime_type: None, title: Some(String::from("title")), caption: Some(String::from("caption")), parse_mode: Some(ParseMode::Html), diff --git a/crates/teloxide-core/src/types/inline_query_result_photo.rs b/crates/teloxide-core/src/types/inline_query_result_photo.rs index e0a1ed0d..5a322e6d 100644 --- a/crates/teloxide-core/src/types/inline_query_result_photo.rs +++ b/crates/teloxide-core/src/types/inline_query_result_photo.rs @@ -59,14 +59,14 @@ pub struct InlineQueryResultPhoto { } impl InlineQueryResultPhoto { - pub fn new(id: S, photo_url: reqwest::Url, thumb_url: reqwest::Url) -> Self + pub fn new(id: S, photo_url: reqwest::Url, thumbnail_url: reqwest::Url) -> Self where S: Into, { Self { id: id.into(), photo_url, - thumbnail_url: thumb_url, + thumbnail_url, photo_width: None, photo_height: None, title: None, diff --git a/crates/teloxide-core/src/types/inline_query_result_video.rs b/crates/teloxide-core/src/types/inline_query_result_video.rs index 130a617f..517b367a 100644 --- a/crates/teloxide-core/src/types/inline_query_result_video.rs +++ b/crates/teloxide-core/src/types/inline_query_result_video.rs @@ -76,7 +76,7 @@ impl InlineQueryResultVideo { id: S1, video_url: reqwest::Url, mime_type: Mime, - thumb_url: reqwest::Url, + thumbnail_url: reqwest::Url, title: S2, ) -> Self where @@ -87,7 +87,7 @@ impl InlineQueryResultVideo { id: id.into(), video_url, mime_type, - thumbnail_url: thumb_url, + thumbnail_url, title: title.into(), caption: None, parse_mode: None, diff --git a/crates/teloxide-core/src/types/message.rs b/crates/teloxide-core/src/types/message.rs index e2de607f..2edf05c4 100644 --- a/crates/teloxide-core/src/types/message.rs +++ b/crates/teloxide-core/src/types/message.rs @@ -1708,7 +1708,7 @@ mod tests { "width": 512, "height": 640, "mime_type": "video/mp4", - "thumb": { + "thumbnail": { "file_id": "AAQCAAOmBAACBf2oS53pByA-I4CWWCObDwAEAQAHbQADMWcAAhYE", "file_unique_id":"", "file_size": 10339, @@ -1800,7 +1800,7 @@ mod tests { "width": 512, "height": 640, "mime_type": "video/mp4", - "thumb": { + "thumbnail": { "file_id": "AAQCAAOmBAACBf2oS53pByA-I4CWWCObDwAEAQAHbQADMWcAAhYE", "file_unique_id":"", "file_size": 10339, @@ -1870,7 +1870,7 @@ mod tests { "is_animated": true, "is_video": false, "type": "regular", - "thumb": { + "thumbnail": { "file_id": "AAMCAgADGQEAARIt0GMwiZ6n4nRbxdpM3pL8vPX6PVAhAAIjAAOw0PgMaabKAcaXKCABAAdtAAMpBA", "file_unique_id": "AQADIwADsND4DHI", "file_size": 4118,