From d5baf0fb3a5de9f29190cf027f61d3c54acc411a Mon Sep 17 00:00:00 2001 From: levlam Date: Wed, 1 Nov 2023 21:35:43 +0300 Subject: [PATCH] tg_cli: fix setChatDraftMessage. --- td/telegram/cli.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/td/telegram/cli.cpp b/td/telegram/cli.cpp index 2c09dafd4..4c58eff07 100644 --- a/td/telegram/cli.cpp +++ b/td/telegram/cli.cpp @@ -4127,8 +4127,10 @@ class CliClient final : public Actor { auto reply_to = get_input_message_reply_to(); if (reply_to != nullptr || !message.empty()) { vector> entities; - entities.push_back( - td_api::make_object(0, 1, td_api::make_object())); + if (!message.empty()) { + entities.push_back( + td_api::make_object(0, 1, td_api::make_object())); + } draft_message = td_api::make_object( std::move(reply_to), 0, td_api::make_object(as_formatted_text(message, std::move(entities)), nullptr,