diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index 895791c48..e90401c9b 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -2566,6 +2566,9 @@ linkPreviewTypeChannelBoost photo:chatPhoto = LinkPreviewType; //@creates_join_request True, if the link only creates join request linkPreviewTypeChat type:InviteLinkChatType photo:chatPhoto creates_join_request:Bool = LinkPreviewType; +//@description The link is a link to an invoice +linkPreviewTypeInvoice = LinkPreviewType; + //@description The link is a link to a Telegram Premium gift code linkPreviewTypePremiumGiftCode = LinkPreviewType; diff --git a/td/telegram/WebPagesManager.cpp b/td/telegram/WebPagesManager.cpp index e7aad9b0f..0ada0bc46 100644 --- a/td/telegram/WebPagesManager.cpp +++ b/td/telegram/WebPagesManager.cpp @@ -1367,6 +1367,9 @@ 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 == "invoice") { + return td_api::make_object(); + } if (type == "livestream") { return td_api::make_object( get_chat_photo_object(td_->file_manager_.get(), web_page->photo_), true);