diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index 283965ce5..dfb25c798 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -2560,6 +2560,9 @@ linkPreviewTypeBackground document:document = LinkPreviewType; //@description The link is a link to a channel chat @photo Photo of the chat linkPreviewTypeChannel photo:chatPhoto = LinkPreviewType; +//@description The link is a link to boost a channel chat @photo Photo of the chat +linkPreviewTypeChannelBoost photo:chatPhoto = LinkPreviewType; + //@description The link is a link to a Telegram Premium gift code linkPreviewTypePremiumGiftCode = LinkPreviewType; @@ -2575,6 +2578,9 @@ linkPreviewTypeStory story_sender_chat_id:int53 story_id:int32 = LinkPreviewType //@description The link is a link to a supergroup chat @photo Photo of the chat linkPreviewTypeSupergroup photo:chatPhoto = LinkPreviewType; +//@description The link is a link to boost a supergroup chat @photo Photo of the chat +linkPreviewTypeSupergroupBoost photo:chatPhoto = LinkPreviewType; + //@description The link is a link to a cloud theme. TDLib has no theme support yet @documents The list of files with theme description linkPreviewTypeTheme documents:vector = LinkPreviewType; diff --git a/td/telegram/WebPagesManager.cpp b/td/telegram/WebPagesManager.cpp index a4b856eb3..2cb863a8e 100644 --- a/td/telegram/WebPagesManager.cpp +++ b/td/telegram/WebPagesManager.cpp @@ -1347,12 +1347,20 @@ td_api::object_ptr WebPagesManager::get_link_preview_ty return td_api::make_object( get_chat_photo_object(td_->file_manager_.get(), web_page->photo_)); } + if (type == "channel_boost") { + return td_api::make_object( + get_chat_photo_object(td_->file_manager_.get(), web_page->photo_)); + } if (type == "chatlist") { return td_api::make_object(); } if (type == "giftcode") { return td_api::make_object(); } + if (type == "group_boost") { + return td_api::make_object( + get_chat_photo_object(td_->file_manager_.get(), web_page->photo_)); + } if (type == "livestream") { return td_api::make_object( get_chat_photo_object(td_->file_manager_.get(), web_page->photo_), true);