diff --git a/td/generate/scheme/secret_api.tl b/td/generate/scheme/secret_api.tl index 35d6b6575..25231eb26 100644 --- a/td/generate/scheme/secret_api.tl +++ b/td/generate/scheme/secret_api.tl @@ -15,12 +15,12 @@ vector {t:Type} # [ t ] = Vector t; decryptedMessage8#1f814f1f random_id:long random_bytes:bytes message:string media:DecryptedMessageMedia = DecryptedMessage; decryptedMessageService8#aa48327d random_id:long random_bytes:bytes action:DecryptedMessageAction = DecryptedMessage; decryptedMessageMediaEmpty#89f5c4a = DecryptedMessageMedia; -decryptedMessageMediaPhoto23#32798a8c thumb:bytes thumb_w:int thumb_h:int w:int h:int size:int key:bytes iv:bytes = DecryptedMessageMedia; +decryptedMessageMediaPhoto8#32798a8c thumb:bytes thumb_w:int thumb_h:int w:int h:int size:int key:bytes iv:bytes = DecryptedMessageMedia; decryptedMessageMediaVideo8#4cee6ef3 thumb:bytes thumb_w:int thumb_h:int duration:int w:int h:int size:int key:bytes iv:bytes = DecryptedMessageMedia; decryptedMessageMediaGeoPoint#35480a59 lat:double long:double = DecryptedMessageMedia; decryptedMessageMediaContact#588a0a97 phone_number:string first_name:string last_name:string user_id:int = DecryptedMessageMedia; decryptedMessageActionSetMessageTTL#a1733aec ttl_seconds:int = DecryptedMessageAction; -decryptedMessageMediaDocument23#b095434b thumb:bytes thumb_w:int thumb_h:int file_name:string mime_type:string size:int key:bytes iv:bytes = DecryptedMessageMedia; +decryptedMessageMediaDocument8#b095434b thumb:bytes thumb_w:int thumb_h:int file_name:string mime_type:string size:int key:bytes iv:bytes = DecryptedMessageMedia; decryptedMessageMediaAudio8#6080758f duration:int size:int key:bytes iv:bytes = DecryptedMessageMedia; decryptedMessageActionReadMessages#c4f40be random_ids:Vector = DecryptedMessageAction; decryptedMessageActionDeleteMessages#65614304 random_ids:Vector = DecryptedMessageAction; @@ -59,7 +59,7 @@ decryptedMessageActionNoop#a82fdd63 = DecryptedMessageAction; documentAttributeImageSize#6c37c15c w:int h:int = DocumentAttribute; documentAttributeAnimated#11b58939 = DocumentAttribute; documentAttributeSticker23#fb0a5727 = DocumentAttribute; -documentAttributeVideo#5910cccb duration:int w:int h:int = DocumentAttribute; +documentAttributeVideo23#5910cccb duration:int w:int h:int = DocumentAttribute; documentAttributeAudio23#51448e5 duration:int = DocumentAttribute; documentAttributeFilename#15590068 file_name:string = DocumentAttribute; photoSizeEmpty#e17e23c type:string = PhotoSize; @@ -105,7 +105,7 @@ decryptedMessageMediaWebPage#e50511d8 url:string = DecryptedMessageMedia; sendMessageRecordRoundAction#88f27fbc = SendMessageAction; sendMessageUploadRoundAction#bb718624 = SendMessageAction; -documentAttributeVideo66#ef02ce6 flags:# round_message:flags.0?true duration:int w:int h:int = DocumentAttribute; +documentAttributeVideo#ef02ce6 flags:# round_message:flags.0?true duration:int w:int h:int = DocumentAttribute; // layer 73 diff --git a/td/telegram/AnimationsManager.cpp b/td/telegram/AnimationsManager.cpp index f5d103fc9..1c9c386d0 100644 --- a/td/telegram/AnimationsManager.cpp +++ b/td/telegram/AnimationsManager.cpp @@ -384,7 +384,7 @@ SecretInputMedia AnimationsManager::get_secret_input_media(FileId animation_file attributes.push_back(make_tl_object(animation->file_name)); } if (animation->duration != 0 && animation->mime_type == "video/mp4") { - attributes.push_back(make_tl_object( + attributes.push_back(make_tl_object( 0, false, animation->duration, animation->dimensions.width, animation->dimensions.height)); } if (animation->dimensions.width != 0 && animation->dimensions.height != 0) { diff --git a/td/telegram/MessageContent.cpp b/td/telegram/MessageContent.cpp index 7813c4623..c504cd02e 100644 --- a/td/telegram/MessageContent.cpp +++ b/td/telegram/MessageContent.cpp @@ -3997,8 +3997,8 @@ static auto secret_to_telegram(secret_api::documentAttributeSticker &sticker) { nullptr); } -// documentAttributeVideo duration:int w:int h:int = DocumentAttribute; -static auto secret_to_telegram(secret_api::documentAttributeVideo &video) { +// documentAttributeVideo23 duration:int w:int h:int = DocumentAttribute; +static auto secret_to_telegram(secret_api::documentAttributeVideo23 &video) { return make_tl_object(0, false /*ignored*/, false /*ignored*/, video.duration_, video.w_, video.h_); } @@ -4011,10 +4011,10 @@ static auto secret_to_telegram(secret_api::documentAttributeFilename &filename) return make_tl_object(filename.file_name_); } -// documentAttributeVideo66 flags:# round_message:flags.0?true duration:int w:int h:int = DocumentAttribute; -static auto secret_to_telegram(secret_api::documentAttributeVideo66 &video) { +// documentAttributeVideo flags:# round_message:flags.0?true duration:int w:int h:int = DocumentAttribute; +static auto secret_to_telegram(secret_api::documentAttributeVideo &video) { return make_tl_object( - (video.flags_ & secret_api::documentAttributeVideo66::ROUND_MESSAGE_MASK) != 0 + (video.flags_ & secret_api::documentAttributeVideo::ROUND_MESSAGE_MASK) != 0 ? telegram_api::documentAttributeVideo::ROUND_MESSAGE_MASK : 0, video.round_message_, false, video.duration_, video.w_, video.h_); @@ -4195,7 +4195,7 @@ unique_ptr get_secret_message_content( auto media = move_tl_object_as(media_ptr); vector> attributes; attributes.emplace_back( - make_tl_object(media->duration_, media->w_, media->h_)); + make_tl_object(0, false, media->duration_, media->w_, media->h_)); media_ptr = make_tl_object( std::move(media->thumb_), media->thumb_w_, media->thumb_h_, media->mime_type_, media->size_, std::move(media->key_), std::move(media->iv_), std::move(attributes), string()); diff --git a/td/telegram/VideoNotesManager.cpp b/td/telegram/VideoNotesManager.cpp index d59caeb96..63953b777 100644 --- a/td/telegram/VideoNotesManager.cpp +++ b/td/telegram/VideoNotesManager.cpp @@ -159,9 +159,9 @@ SecretInputMedia VideoNotesManager::get_secret_input_media(FileId video_note_fil return SecretInputMedia{}; } vector> attributes; - attributes.push_back(make_tl_object( - secret_api::documentAttributeVideo66::ROUND_MESSAGE_MASK, true, video_note->duration, - video_note->dimensions.width, video_note->dimensions.height)); + attributes.push_back(make_tl_object( + secret_api::documentAttributeVideo::ROUND_MESSAGE_MASK, true, video_note->duration, video_note->dimensions.width, + video_note->dimensions.height)); return {std::move(input_file), std::move(thumbnail), diff --git a/td/telegram/VideosManager.cpp b/td/telegram/VideosManager.cpp index 67842b936..eb60456d9 100644 --- a/td/telegram/VideosManager.cpp +++ b/td/telegram/VideosManager.cpp @@ -206,8 +206,8 @@ SecretInputMedia VideosManager::get_secret_input_media(FileId video_file_id, return {}; } vector> attributes; - attributes.emplace_back(make_tl_object(video->duration, video->dimensions.width, - video->dimensions.height)); + attributes.emplace_back(make_tl_object( + 0, false, video->duration, video->dimensions.width, video->dimensions.height)); return {std::move(input_file), std::move(thumbnail),