Add td_api::linkPreviewTypeMessage.

This commit is contained in:
levlam 2024-07-04 18:50:48 +03:00
parent a31b27c456
commit 9ad612a42e
2 changed files with 6 additions and 0 deletions

View File

@ -2614,6 +2614,9 @@ linkPreviewTypeEmbeddedVideoPlayer url:string duration:int32 author:string width
//@description The link is a link to an invoice
linkPreviewTypeInvoice = LinkPreviewType;
//@description The link is a link to a text or a poll Telegram message
linkPreviewTypeMessage = LinkPreviewType;
//@description The link is a link to a photo @photo The photo @author Author of the photo
linkPreviewTypePhoto photo:photo author:string = LinkPreviewType;

View File

@ -1444,6 +1444,9 @@ td_api::object_ptr<td_api::LinkPreviewType> WebPagesManager::get_link_preview_ty
td_api::make_object<td_api::inviteLinkChatTypeSupergroup>(),
get_chat_photo_object(td_->file_manager_.get(), web_page->photo_), type.size() > 10);
}
if (type == "message") {
return td_api::make_object<td_api::linkPreviewTypeMessage>();
}
if (type == "stickerset") {
auto stickers = transform(web_page->sticker_ids_, [&](FileId sticker_id) {
return td_->stickers_manager_->get_sticker_object(sticker_id);