Add version to td_api::webPageInstantView.

GitOrigin-RevId: 81882e97facef38940c6c934e18d82e25dc39e12
This commit is contained in:
levlam 2019-04-17 22:32:14 +03:00
parent fd167da0f1
commit 9715ae4462
3 changed files with 4 additions and 3 deletions

View File

@ -858,10 +858,11 @@ pageBlockMap location:location zoom:int32 width:int32 height:int32 caption:pageB
//@description Describes an instant view page for a web page @page_blocks Content of the web page
//@version Version of the instant view, currently can be 1 or 2
//@url Instant view URL; may be different from WebPage.url and must be used for the correct anchors handling
//@is_rtl True, if the instant view must be shown from right to left
//@is_full True, if the instant view contains the full page. A network request might be needed to get the full web page instant view
webPageInstantView page_blocks:vector<PageBlock> url:string is_rtl:Bool is_full:Bool = WebPageInstantView;
webPageInstantView page_blocks:vector<PageBlock> version:int32 url:string is_rtl:Bool is_full:Bool = WebPageInstantView;
//@description Describes a web page preview @url Original URL of the link @display_url URL to display

Binary file not shown.

View File

@ -2785,8 +2785,8 @@ tl_object_ptr<td_api::webPageInstantView> WebPagesManager::get_web_page_instant_
return nullptr;
}
return make_tl_object<td_api::webPageInstantView>(get_page_block_objects(web_page_instant_view->page_blocks),
web_page_instant_view->url, web_page_instant_view->is_rtl,
web_page_instant_view->is_full);
web_page_instant_view->is_v2 ? 2 : 1, web_page_instant_view->url,
web_page_instant_view->is_rtl, web_page_instant_view->is_full);
}
void WebPagesManager::update_messages_content(WebPageId web_page_id, bool have_web_page) {