@@ -1499,8 +1499,8 @@ class Client::JsonChatPhoto final : public td::Jsonable {
1499
1499
1500
1500
class Client::JsonVideo final : public td::Jsonable {
1501
1501
public:
1502
- JsonVideo(const td_api::video *video, const td_api::photo *cover, const Client *client)
1503
- : video_(video), cover_(cover), client_(client) {
1502
+ JsonVideo(const td_api::video *video, const td_api::photo *cover, int32 start_timestamp, const Client *client)
1503
+ : video_(video), cover_(cover), start_timestamp_(start_timestamp), client_(client) {
1504
1504
}
1505
1505
void store(td::JsonValueScope *scope) const {
1506
1506
auto object = scope->enter_object();
@@ -1516,13 +1516,17 @@ class Client::JsonVideo final : public td::Jsonable {
1516
1516
if (cover_ != nullptr) {
1517
1517
object("cover", JsonPhoto(cover_, client_));
1518
1518
}
1519
+ if (start_timestamp_ > 0) {
1520
+ object("start_timestamp", start_timestamp_);
1521
+ }
1519
1522
client_->json_store_thumbnail(object, video_->thumbnail_.get());
1520
1523
client_->json_store_file(object, video_->video_.get());
1521
1524
}
1522
1525
1523
1526
private:
1524
1527
const td_api::video *video_;
1525
1528
const td_api::photo *cover_;
1529
+ int32 start_timestamp_;
1526
1530
const Client *client_;
1527
1531
};
1528
1532
@@ -1591,7 +1595,7 @@ class Client::JsonPaidMedia final : public td::Jsonable {
1591
1595
case td_api::paidMediaVideo::ID: {
1592
1596
auto media = static_cast<const td_api::paidMediaVideo *>(paid_media_);
1593
1597
object("type", "video");
1594
- object("video", JsonVideo(media->video_.get(), media->cover_.get(), client_));
1598
+ object("video", JsonVideo(media->video_.get(), media->cover_.get(), media->start_timestamp_, client_));
1595
1599
break;
1596
1600
}
1597
1601
case td_api::paidMediaUnsupported::ID:
@@ -2810,7 +2814,7 @@ class Client::JsonExternalReplyInfo final : public td::Jsonable {
2810
2814
}
2811
2815
case td_api::messageVideo::ID: {
2812
2816
auto content = static_cast<const td_api::messageVideo *>(reply_->content_.get());
2813
- object("video", JsonVideo(content->video_.get(), content->cover_.get(), client_));
2817
+ object("video", JsonVideo(content->video_.get(), content->cover_.get(), content->start_timestamp_, client_));
2814
2818
add_media_spoiler(object, content->has_spoiler_);
2815
2819
break;
2816
2820
}
@@ -3068,7 +3072,7 @@ void Client::JsonMessage::store(td::JsonValueScope *scope) const {
3068
3072
}
3069
3073
case td_api::messageVideo::ID: {
3070
3074
auto content = static_cast<const td_api::messageVideo *>(message_->content.get());
3071
- object("video", JsonVideo(content->video_.get(), content->cover_.get(), client_));
3075
+ object("video", JsonVideo(content->video_.get(), content->cover_.get(), content->start_timestamp_, client_));
3072
3076
add_caption(object, content->caption_, content->show_caption_above_media_);
3073
3077
add_media_spoiler(object, content->has_spoiler_);
3074
3078
break;
0 commit comments