Skip to content

Commit dcee0b9

Browse files
committed
Add InputPaidMediaVideo.cover.
1 parent f5bf77f commit dcee0b9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: telegram-bot-api/Client.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -9936,9 +9936,12 @@ td::Result<td_api::object_ptr<td_api::inputPaidMedia>> Client::get_input_paid_me
99369936
} else if (type == "video") {
99379937
TRY_RESULT(duration, object.get_optional_int_field("duration"));
99389938
TRY_RESULT(supports_streaming, object.get_optional_bool_field("supports_streaming"));
9939+
TRY_RESULT(cover, object.get_optional_string_field("cover"));
99399940
TRY_RESULT(start_timestamp, object.get_optional_int_field("start_timestamp"));
9941+
auto cover_input_file = get_input_file(query, "cover", cover, false);
99409942
duration = td::clamp(duration, 0, MAX_DURATION);
9941-
media_type = make_object<td_api::inputPaidMediaTypeVideo>(nullptr, start_timestamp, duration, supports_streaming);
9943+
media_type = make_object<td_api::inputPaidMediaTypeVideo>(std::move(cover_input_file), start_timestamp, duration,
9944+
supports_streaming);
99429945
} else {
99439946
return td::Status::Error(PSLICE() << "type \"" << type << "\" is unsupported");
99449947
}

0 commit comments

Comments
 (0)