From 748996713701b74d78f26cb8f64d1caab05d3447 Mon Sep 17 00:00:00 2001 From: levlam Date: Thu, 4 Jul 2024 00:32:00 +0300 Subject: [PATCH] Add td_api::linkPreviewTypeInvoice. --- td/generate/scheme/td_api.tl | 3 +++ td/telegram/WebPagesManager.cpp | 3 +++ 2 files changed, 6 insertions(+) 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);