diff --git a/src/api_params.rs b/src/api_params.rs index ee8a696..6ec1e3c 100644 --- a/src/api_params.rs +++ b/src/api_params.rs @@ -7,13 +7,13 @@ use crate::objects::{ InlineQueryResultCachedVoice, InlineQueryResultContact, InlineQueryResultDocument, InlineQueryResultGame, InlineQueryResultGif, InlineQueryResultLocation, InlineQueryResultMpeg4Gif, InlineQueryResultPhoto, InlineQueryResultVenue, - InlineQueryResultVideo, InlineQueryResultVoice, InputSticker, LabeledPrice, MaskPosition, - MenuButton, MessageEntity, PassportElementErrorDataField, PassportElementErrorFile, - PassportElementErrorFiles, PassportElementErrorFrontSide, PassportElementErrorReverseSide, - PassportElementErrorSelfie, PassportElementErrorTranslationFile, - PassportElementErrorTranslationFiles, PassportElementErrorUnspecified, PollType, ReactionType, - ReplyKeyboardMarkup, ReplyKeyboardRemove, ShippingOption, StickerFormat, StickerType, - WebAppInfo, + InlineQueryResultVideo, InlineQueryResultVoice, InputSticker, LabeledPrice, LinkPreviewOptions, + MaskPosition, MenuButton, MessageEntity, PassportElementErrorDataField, + PassportElementErrorFile, PassportElementErrorFiles, PassportElementErrorFrontSide, + PassportElementErrorReverseSide, PassportElementErrorSelfie, + PassportElementErrorTranslationFile, PassportElementErrorTranslationFiles, + PassportElementErrorUnspecified, PollType, ReactionType, ReplyKeyboardMarkup, + ReplyKeyboardRemove, ShippingOption, StickerFormat, StickerType, WebAppInfo, }; use crate::{AllowedUpdate, ParseMode}; use serde::Deserialize; @@ -298,7 +298,7 @@ pub struct SendMessageParams { #[serde(skip_serializing_if = "Option::is_none")] #[builder(setter(into, strip_option), default)] - pub disable_web_page_preview: Option, + pub link_preview_options: Option, #[serde(skip_serializing_if = "Option::is_none")] #[builder(setter(into, strip_option), default)] @@ -1688,7 +1688,7 @@ pub struct EditMessageTextParams { #[serde(skip_serializing_if = "Option::is_none")] #[builder(setter(into, strip_option), default)] - pub disable_web_page_preview: Option, + pub link_preview_options: Option, #[serde(skip_serializing_if = "Option::is_none")] #[builder(setter(into, strip_option), default)] diff --git a/src/objects.rs b/src/objects.rs index 13c14db..0c5f496 100644 --- a/src/objects.rs +++ b/src/objects.rs @@ -673,6 +673,10 @@ pub struct Message { #[builder(setter(into, strip_option), default)] pub entities: Option>, + #[serde(skip_serializing_if = "Option::is_none")] + #[builder(setter(into, strip_option), default)] + pub link_preview_options: Option, + #[serde(skip_serializing_if = "Option::is_none")] #[builder(setter(into, strip_option), default)] pub animation: Option>, @@ -1060,7 +1064,7 @@ pub struct MessageOriginChannel { pub author_signature: Option, } -#[derive(Builder, Clone, Debug, Serialize, Deserialize, PartialEq)] +#[derive(Builder, Clone, Debug, Serialize, Deserialize, PartialEq, Eq)] pub struct LinkPreviewOptions { #[serde(skip_serializing_if = "Option::is_none")] #[builder(setter(into, strip_option), default)] @@ -2937,7 +2941,7 @@ pub struct InputTextMessageContent { #[serde(skip_serializing_if = "Option::is_none")] #[builder(setter(into, strip_option), default)] - pub disable_web_page_preview: Option, + pub link_preview_options: Option, } #[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Builder)]