Remove embed_ fields from linkPreview.

This commit is contained in:
levlam 2024-07-04 13:58:21 +03:00
parent f2a855901a
commit 5944fda0d6
2 changed files with 2 additions and 7 deletions

View File

@ -2641,10 +2641,6 @@ linkPreviewTypeOther type:string = LinkPreviewType;
//@param_description Description of the content
//@type Type of the link preview
//@photo Image representing the content; may be null
//@embed_url URL to show in the embedded preview
//@embed_type MIME type of the embedded preview, (e.g., text/html or video/mp4)
//@embed_width Width of the embedded preview
//@embed_height Height of the embedded preview
//@duration Duration of the content, in seconds
//@author Author of the content
//@has_large_media True, if size of media in the preview can be changed
@ -2659,7 +2655,7 @@ linkPreviewTypeOther type:string = LinkPreviewType;
//@video_note Preview of the content as a video note, if available; may be null
//@voice_note Preview of the content as a voice note, if available; may be null
//@instant_view_version Version of instant view (currently, can be 1 or 2) for the web page; 0 if none
linkPreview url:string display_url:string site_name:string title:string description:formattedText type:LinkPreviewType photo:photo embed_url:string embed_type:string embed_width:int32 embed_height:int32 duration:int32 author:string has_large_media:Bool show_large_media:Bool skip_confirmation:Bool show_above_text:Bool animation:animation audio:audio document:document sticker:sticker video:video video_note:videoNote voice_note:voiceNote instant_view_version:int32 = LinkPreview;
linkPreview url:string display_url:string site_name:string title:string description:formattedText type:LinkPreviewType photo:photo duration:int32 author:string has_large_media:Bool show_large_media:Bool skip_confirmation:Bool show_above_text:Bool animation:animation audio:audio document:document sticker:sticker video:video video_note:videoNote voice_note:voiceNote instant_view_version:int32 = LinkPreview;
//@description Contains information about a country

View File

@ -1604,8 +1604,7 @@ td_api::object_ptr<td_api::linkPreview> WebPagesManager::get_link_preview_object
web_page->url_, web_page->display_url_, web_page->site_name_, web_page->title_,
get_formatted_text_object(description, true, duration == 0 ? std::numeric_limits<int32>::max() : duration),
get_link_preview_type_object(web_page, force_small_media, force_large_media),
get_photo_object(td_->file_manager_.get(), web_page->photo_), web_page->embed_url_, web_page->embed_type_,
web_page->embed_dimensions_.width, web_page->embed_dimensions_.height, web_page->duration_, web_page->author_,
get_photo_object(td_->file_manager_.get(), web_page->photo_), web_page->duration_, web_page->author_,
web_page->has_large_media_, show_large_media, skip_confirmation, invert_media,
web_page->document_.type == Document::Type::Animation
? td_->animations_manager_->get_animation_object(web_page->document_.file_id)