Improve inputMessageDocument.disable_content_type_detection field name.

GitOrigin-RevId: b2155f743635437e11d4c346bad641427cb737fa
This commit is contained in:
levlam 2020-09-14 15:40:34 +03:00
parent bc000b5a53
commit 143a4961b6
3 changed files with 3 additions and 3 deletions

View File

@ -1750,8 +1750,8 @@ inputMessageAnimation animation:InputFile thumbnail:inputThumbnail added_sticker
//@performer Performer of the audio; 0-64 characters, may be replaced by the server @caption Audio caption; 0-GetOption("message_caption_length_max") characters
inputMessageAudio audio:InputFile album_cover_thumbnail:inputThumbnail duration:int32 title:string performer:string caption:formattedText = InputMessageContent;
//@description A document message (general file) @document Document to be sent @thumbnail Document thumbnail, if available @force_file If true, automatic file type detection will be disabled and the document will be always sent as file. Always true for files sent to secret chats @caption Document caption; 0-GetOption("message_caption_length_max") characters
inputMessageDocument document:InputFile thumbnail:inputThumbnail force_file:Bool caption:formattedText = InputMessageContent;
//@description A document message (general file) @document Document to be sent @thumbnail Document thumbnail, if available @disable_content_type_detection If true, automatic file type detection will be disabled and the document will be always sent as file. Always true for files sent to secret chats @caption Document caption; 0-GetOption("message_caption_length_max") characters
inputMessageDocument document:InputFile thumbnail:inputThumbnail disable_content_type_detection:Bool caption:formattedText = InputMessageContent;
//@description A photo message @photo Photo to send @thumbnail Photo thumbnail to be sent, this is sent to the other party in secret chats only @added_sticker_file_ids File identifiers of the stickers added to the photo, if applicable @width Photo width @height Photo height @caption Photo caption; 0-GetOption("message_caption_length_max") characters
//@ttl Photo TTL (Time To Live), in seconds (0-60). A non-zero TTL can be specified only in private chats

Binary file not shown.

View File

@ -1859,7 +1859,7 @@ Result<InputMessageContent> get_input_message_content(
}
case td_api::inputMessageDocument::ID: {
auto input_message = static_cast<td_api::inputMessageDocument *>(input_message_content.get());
auto file_type = input_message->force_file_ ? FileType::DocumentAsFile : FileType::Document;
auto file_type = input_message->disable_content_type_detection_ ? FileType::DocumentAsFile : FileType::Document;
r_file_id =
td->file_manager_->get_input_file_id(file_type, input_message->document_, dialog_id, false, is_secret, true);
input_thumbnail = std::move(input_message->thumbnail_);