Improve secret chat schema constructor naming.
This commit is contained in:
parent
e39bd45086
commit
6917d9c36f
@ -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<long> = DecryptedMessageAction;
|
||||
decryptedMessageActionDeleteMessages#65614304 random_ids:Vector<long> = 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
|
||||
|
||||
|
@ -384,7 +384,7 @@ SecretInputMedia AnimationsManager::get_secret_input_media(FileId animation_file
|
||||
attributes.push_back(make_tl_object<secret_api::documentAttributeFilename>(animation->file_name));
|
||||
}
|
||||
if (animation->duration != 0 && animation->mime_type == "video/mp4") {
|
||||
attributes.push_back(make_tl_object<secret_api::documentAttributeVideo66>(
|
||||
attributes.push_back(make_tl_object<secret_api::documentAttributeVideo>(
|
||||
0, false, animation->duration, animation->dimensions.width, animation->dimensions.height));
|
||||
}
|
||||
if (animation->dimensions.width != 0 && animation->dimensions.height != 0) {
|
||||
|
@ -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<telegram_api::documentAttributeVideo>(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<telegram_api::documentAttributeFilename>(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<telegram_api::documentAttributeVideo>(
|
||||
(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<MessageContent> get_secret_message_content(
|
||||
auto media = move_tl_object_as<secret_api::decryptedMessageMediaVideo>(media_ptr);
|
||||
vector<tl_object_ptr<secret_api::DocumentAttribute>> attributes;
|
||||
attributes.emplace_back(
|
||||
make_tl_object<secret_api::documentAttributeVideo>(media->duration_, media->w_, media->h_));
|
||||
make_tl_object<secret_api::documentAttributeVideo>(0, false, media->duration_, media->w_, media->h_));
|
||||
media_ptr = make_tl_object<secret_api::decryptedMessageMediaDocument>(
|
||||
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());
|
||||
|
@ -159,9 +159,9 @@ SecretInputMedia VideoNotesManager::get_secret_input_media(FileId video_note_fil
|
||||
return SecretInputMedia{};
|
||||
}
|
||||
vector<tl_object_ptr<secret_api::DocumentAttribute>> attributes;
|
||||
attributes.push_back(make_tl_object<secret_api::documentAttributeVideo66>(
|
||||
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>(
|
||||
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),
|
||||
|
@ -206,8 +206,8 @@ SecretInputMedia VideosManager::get_secret_input_media(FileId video_file_id,
|
||||
return {};
|
||||
}
|
||||
vector<tl_object_ptr<secret_api::DocumentAttribute>> attributes;
|
||||
attributes.emplace_back(make_tl_object<secret_api::documentAttributeVideo>(video->duration, video->dimensions.width,
|
||||
video->dimensions.height));
|
||||
attributes.emplace_back(make_tl_object<secret_api::documentAttributeVideo>(
|
||||
0, false, video->duration, video->dimensions.width, video->dimensions.height));
|
||||
|
||||
return {std::move(input_file),
|
||||
std::move(thumbnail),
|
||||
|
Loading…
Reference in New Issue
Block a user