diff --git a/telegram-bot-api/Client.cpp b/telegram-bot-api/Client.cpp index f9534ed..0713cad 100644 --- a/telegram-bot-api/Client.cpp +++ b/telegram-bot-api/Client.cpp @@ -9936,9 +9936,12 @@ td::Result> Client::get_input_paid_me } else if (type == "video") { TRY_RESULT(duration, object.get_optional_int_field("duration")); TRY_RESULT(supports_streaming, object.get_optional_bool_field("supports_streaming")); + TRY_RESULT(cover, object.get_optional_string_field("cover")); TRY_RESULT(start_timestamp, object.get_optional_int_field("start_timestamp")); + auto cover_input_file = get_input_file(query, "cover", cover, false); duration = td::clamp(duration, 0, MAX_DURATION); - media_type = make_object(nullptr, start_timestamp, duration, supports_streaming); + media_type = make_object(std::move(cover_input_file), start_timestamp, duration, + supports_streaming); } else { return td::Status::Error(PSLICE() << "type \"" << type << "\" is unsupported"); }