Add td_api::linkPreviewTypeShareableChatFolder.

This commit is contained in:
levlam 2024-07-03 16:04:04 +03:00
parent 7e85824bd2
commit 11271865c5
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
linkPreviewTypeBackground document:document = LinkPreviewType;
//@description The link is a link to a shareable chat folder
linkPreviewTypeShareableChatFolder = LinkPreviewType;
//@description The link is a link to a sticker set @stickers Up to 4 stickers from the sticker set
linkPreviewTypeStickerSet stickers:vector<sticker> = LinkPreviewType;

View File

@ -1343,6 +1343,9 @@ td_api::object_ptr<td_api::LinkPreviewType> WebPagesManager::get_link_preview_ty
? td_->documents_manager_->get_document_object(web_page->document_.file_id, PhotoFormat::Png)
: nullptr);
}
if (type == "chatlist") {
return td_api::make_object<td_api::linkPreviewTypeShareableChatFolder>();
}
if (type == "stickerset") {
auto stickers = transform(web_page->sticker_ids_, [&](FileId sticker_id) {
return td_->stickers_manager_->get_sticker_object(sticker_id);