From 9715ae446211630e38259c57306bfddb8f47f061 Mon Sep 17 00:00:00 2001 From: levlam Date: Wed, 17 Apr 2019 22:32:14 +0300 Subject: [PATCH] Add version to td_api::webPageInstantView. GitOrigin-RevId: 81882e97facef38940c6c934e18d82e25dc39e12 --- td/generate/scheme/td_api.tl | 3 ++- td/generate/scheme/td_api.tlo | Bin 151124 -> 151156 bytes td/telegram/WebPagesManager.cpp | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index cdcb7be86..42fba0cce 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -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 url:string is_rtl:Bool is_full:Bool = WebPageInstantView; +webPageInstantView page_blocks:vector 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 diff --git a/td/generate/scheme/td_api.tlo b/td/generate/scheme/td_api.tlo index 1056617a480987e5a23e38e9d15a84648183ba39..1470469e08eff3f46010db792005c9d8269ef94d 100644 GIT binary patch delta 95 zcmcaIhx5xE&J70YEPCAhmdz&W+fCFNIhw(|=?<$HML0p?H;)PVuuh)%*MYq(wWv5V lKX38}4TeM2SP==)Qp3U&0A_8!z{1qx2>^sQ9JT-e delta 84 zcmew|hx5uD&J70YEQyC+FK#wb-)^GL$k7buO?OzuD8dO6zj;i^hh_4_zxLDjtYS<6 ZOKw+K%~%l$Q8$N$DF7n)frY8X696qXC4~S0 diff --git a/td/telegram/WebPagesManager.cpp b/td/telegram/WebPagesManager.cpp index d9c706fe9..998f76551 100644 --- a/td/telegram/WebPagesManager.cpp +++ b/td/telegram/WebPagesManager.cpp @@ -2785,8 +2785,8 @@ tl_object_ptr WebPagesManager::get_web_page_instant_ return nullptr; } return make_tl_object(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) {