Add td_api::linkPreviewTypePremiumGiftCode.

This commit is contained in:
levlam 2024-07-03 16:07:19 +03:00
parent 11271865c5
commit 5b9bfcd67e
2 changed files with 6 additions and 0 deletions

View File

@ -2556,6 +2556,9 @@ webPageInstantView page_blocks:vector<PageBlock> view_count:int32 version:int32
//@description The link is a link to a background @document Document with the background; may be null for filled backgrounds //@description The link is a link to a background @document Document with the background; may be null for filled backgrounds
linkPreviewTypeBackground document:document = LinkPreviewType; linkPreviewTypeBackground document:document = LinkPreviewType;
//@description The link is a link to a Telegram Premium gift code
linkPreviewTypePremiumGiftCode = LinkPreviewType;
//@description The link is a link to a shareable chat folder //@description The link is a link to a shareable chat folder
linkPreviewTypeShareableChatFolder = LinkPreviewType; linkPreviewTypeShareableChatFolder = LinkPreviewType;

View File

@ -1346,6 +1346,9 @@ td_api::object_ptr<td_api::LinkPreviewType> WebPagesManager::get_link_preview_ty
if (type == "chatlist") { if (type == "chatlist") {
return td_api::make_object<td_api::linkPreviewTypeShareableChatFolder>(); return td_api::make_object<td_api::linkPreviewTypeShareableChatFolder>();
} }
if (type == "giftcode") {
return td_api::make_object<td_api::linkPreviewTypePremiumGiftCode>();
}
if (type == "stickerset") { if (type == "stickerset") {
auto stickers = transform(web_page->sticker_ids_, [&](FileId sticker_id) { auto stickers = transform(web_page->sticker_ids_, [&](FileId sticker_id) {
return td_->stickers_manager_->get_sticker_object(sticker_id); return td_->stickers_manager_->get_sticker_object(sticker_id);