Add clear_draft parameter to inputMessageDice.

GitOrigin-RevId: 2ff67cf4fe198241f7713103f46d7d724d51e591
This commit is contained in:
levlam 2020-04-13 14:18:46 +03:00
parent 73a33d15a8
commit 4905a851f0
4 changed files with 8 additions and 5 deletions

View File

@ -1584,8 +1584,8 @@ inputMessageVenue venue:venue = InputMessageContent;
//@description A message containing a user contact @contact Contact to send //@description A message containing a user contact @contact Contact to send
inputMessageContact contact:contact = InputMessageContent; inputMessageContact contact:contact = InputMessageContent;
//@description A dice message //@description A dice message @clear_draft True, if a chat message draft should be deleted
inputMessageDice = InputMessageContent; inputMessageDice clear_draft:Bool = InputMessageContent;
//@description A message with a game; not supported for channels or secret chats @bot_user_id User identifier of the bot that owns the game @game_short_name Short name of the game //@description A message with a game; not supported for channels or secret chats @bot_user_id User identifier of the bot that owns the game @game_short_name Short name of the game
inputMessageGame bot_user_id:int32 game_short_name:string = InputMessageContent; inputMessageGame bot_user_id:int32 game_short_name:string = InputMessageContent;

Binary file not shown.

View File

@ -1475,9 +1475,12 @@ static Result<InputMessageContent> create_input_message_content(
content = make_unique<MessageAudio>(file_id, std::move(caption)); content = make_unique<MessageAudio>(file_id, std::move(caption));
break; break;
} }
case td_api::inputMessageDice::ID: case td_api::inputMessageDice::ID: {
auto input_dice = static_cast<const td_api::inputMessageDice *>(input_message_content.get());
content = make_unique<MessageDice>(); content = make_unique<MessageDice>();
clear_draft = input_dice->clear_draft_;
break; break;
}
case td_api::inputMessageDocument::ID: case td_api::inputMessageDocument::ID:
td->documents_manager_->create_document(file_id, string(), thumbnail, std::move(file_name), std::move(mime_type), td->documents_manager_->create_document(file_id, string(), thumbnail, std::move(file_name), std::move(mime_type),
false); false);

View File

@ -3123,8 +3123,8 @@ class CliClient final : public Actor {
send_message(chat_id, td_api::make_object<td_api::inputMessageForwarded>(as_chat_id(from_chat_id), send_message(chat_id, td_api::make_object<td_api::inputMessageForwarded>(as_chat_id(from_chat_id),
as_message_id(from_message_id), true, as_message_id(from_message_id), true,
op == "scopy", Random::fast(0, 1) == 0)); op == "scopy", Random::fast(0, 1) == 0));
} else if (op == "sdice") { } else if (op == "sdice" || op == "sdicecd") {
send_message(args, td_api::make_object<td_api::inputMessageDice>()); send_message(args, td_api::make_object<td_api::inputMessageDice>(op == "sdicecd"));
} else if (op == "sd") { } else if (op == "sd") {
string chat_id; string chat_id;
string document_path; string document_path;