diff --git a/td/telegram/cli.cpp b/td/telegram/cli.cpp index fec70869..b4d28a72 100644 --- a/td/telegram/cli.cpp +++ b/td/telegram/cli.cpp @@ -345,6 +345,8 @@ class CliClient final : public Actor { // TODO: actually download file_generation.source = "test.jpg"; file_generation.part_size = 1000000; + } else if (update.conversion_ == "skip") { + return; } else { file_generation.source = update.original_path_; file_generation.part_size = to_integer(update.conversion_); diff --git a/td/telegram/files/FileManager.cpp b/td/telegram/files/FileManager.cpp index d8dc4620..3a4be77b 100644 --- a/td/telegram/files/FileManager.cpp +++ b/td/telegram/files/FileManager.cpp @@ -1589,7 +1589,7 @@ void FileManager::run_generate(FileNodePtr node) { int8 download_priority = 0; int8 upload_priority = 0; - FileId file_id; + FileId file_id = node->main_file_id_; for (auto id : node->file_ids_) { auto *info = get_file_id_info(id); if (info->download_priority_ > download_priority) { @@ -1664,7 +1664,7 @@ void FileManager::run_upload(FileNodePtr node, std::vector bad_parts) { } } int8 priority = 0; - FileId file_id; + FileId file_id = node->main_file_id_; for (auto id : node->file_ids_) { auto *info = get_file_id_info(id); if (info->upload_priority_ > priority) {