From db7573769f3945fc4d9ee27464c8c9c93710d48c Mon Sep 17 00:00:00 2001 From: levlam Date: Fri, 3 Jan 2020 02:14:02 +0300 Subject: [PATCH] Update layer 107. GitOrigin-RevId: c892d895c8d963e68ad8e3e2bdc9ec6279ea046b --- td/generate/scheme/telegram_api.tl | 2 +- td/generate/scheme/telegram_api.tlo | Bin 198312 -> 198360 bytes td/telegram/files/FileDownloader.cpp | 8 +++++++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/td/generate/scheme/telegram_api.tl b/td/generate/scheme/telegram_api.tl index 40007644..8ac37eaa 100644 --- a/td/generate/scheme/telegram_api.tl +++ b/td/generate/scheme/telegram_api.tl @@ -1338,7 +1338,7 @@ photos.deletePhotos#87cf7f2f id:Vector = Vector; photos.getUserPhotos#91cd32a8 user_id:InputUser offset:int max_id:long limit:int = photos.Photos; upload.saveFilePart#b304a621 file_id:long file_part:int bytes:bytes = Bool; -upload.getFile#b15a9afc flags:# precise:flags.0?true location:InputFileLocation offset:int limit:int = upload.File; +upload.getFile#b15a9afc flags:# precise:flags.0?true cdn_supported:flags.1?true location:InputFileLocation offset:int limit:int = upload.File; upload.saveBigFilePart#de7b673d file_id:long file_part:int file_total_parts:int bytes:bytes = Bool; upload.getWebFile#24e6818d location:InputWebFileLocation offset:int limit:int = upload.WebFile; upload.getCdnFile#2000bcc3 file_token:bytes offset:int limit:int = upload.CdnFile; diff --git a/td/generate/scheme/telegram_api.tlo b/td/generate/scheme/telegram_api.tlo index 35ba7fcb8d0b4aa6c6cda5670b0a21eee74af735..c4dd03ab66a4b8f7495298f9b10b31832828cf13 100644 GIT binary patch delta 67 zcmV-J0KEUGjSSe041k0IgaVWUaF>*;0WFoC11Aj)V`Oe$b9HcVZ*p{Hmmx_4BbWSE Z0Th>f0Rt?P@S6pf&94F^w=Dq!dj(9s7ytkO delta 47 zcmV+~0MP%~jSQ%b41k0IgaVWUaFe9KER~!CD3|> FileDownloader::start_part(Part part, int32 NetQueryPtr net_query; if (!use_cdn_) { + int32 flags = 0; +#if !TD_EMSCRIPTEN + // CDN is supported, unless we use domains instead of IPs from a browser + flags |= telegram_api::upload_getFile::CDN_SUPPORTED_MASK; +#endif DcId dc_id = remote_.is_web() ? G()->get_webfile_dc_id() : remote_.get_dc_id(); net_query = G()->net_query_creator().create( UniqueId::next(UniqueId::Type::Default, static_cast(QueryType::Default)), remote_.is_web() ? create_storer(telegram_api::upload_getWebFile(remote_.as_input_web_file_location(), static_cast(part.offset), static_cast(size))) - : create_storer(telegram_api::upload_getFile(0, false /*ignored*/, remote_.as_input_file_location(), + : create_storer(telegram_api::upload_getFile(flags, false /*ignored*/, false /*ignored*/, + remote_.as_input_file_location(), static_cast(part.offset), static_cast(size))), dc_id, is_small_ ? NetQuery::Type::DownloadSmall : NetQuery::Type::Download); } else {