Update sendMessage usages in tests and examples.
This commit is contained in:
parent
289df57852
commit
c62c84665a
@ -211,7 +211,7 @@ namespace TdExample
|
||||
TdApi.ReplyMarkup replyMarkup = new TdApi.ReplyMarkupInlineKeyboard(new TdApi.InlineKeyboardButton[][] { row, row, row });
|
||||
|
||||
TdApi.InputMessageContent content = new TdApi.InputMessageText(new TdApi.FormattedText(message, null), false, true);
|
||||
_client.Send(new TdApi.SendMessage(chatId, 0, 0, null, replyMarkup, content), _defaultHandler);
|
||||
_client.Send(new TdApi.SendMessage(chatId, 0, null, null, replyMarkup, content), _defaultHandler);
|
||||
}
|
||||
|
||||
static void Main()
|
||||
|
@ -294,7 +294,7 @@ public final class Example {
|
||||
TdApi.ReplyMarkup replyMarkup = new TdApi.ReplyMarkupInlineKeyboard(new TdApi.InlineKeyboardButton[][]{row, row, row});
|
||||
|
||||
TdApi.InputMessageContent content = new TdApi.InputMessageText(new TdApi.FormattedText(message, null), false, true);
|
||||
client.send(new TdApi.SendMessage(chatId, 0, 0, null, replyMarkup, content), defaultHandler);
|
||||
client.send(new TdApi.SendMessage(chatId, 0, null, null, replyMarkup, content), defaultHandler);
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws InterruptedException {
|
||||
|
@ -235,7 +235,7 @@ EOT
|
||||
* auto get_me_request = td::td_api::make_object<td::td_api::getMe>();
|
||||
* auto message_text = td::td_api::make_object<td::td_api::formattedText>("Hello, world!!!",
|
||||
* td::td_api::array<td::td_api::object_ptr<td::td_api::textEntity>>());
|
||||
* auto send_message_request = td::td_api::make_object<td::td_api::sendMessage>(chat_id, 0, 0, nullptr, nullptr,
|
||||
* auto send_message_request = td::td_api::make_object<td::td_api::sendMessage>(chat_id, 0, nullptr, nullptr, nullptr,
|
||||
* td::td_api::make_object<td::td_api::inputMessageText>(std::move(message_text), false, true));
|
||||
* \\endcode
|
||||
*
|
||||
|
@ -190,7 +190,7 @@ using tl_object_ptr = tl::unique_ptr<Type>;
|
||||
* auto get_me_request = td::make_tl_object<td::td_api::getMe>();
|
||||
* auto message_text = td::make_tl_object<td::td_api::formattedText>("Hello, world!!!",
|
||||
* td::td_api::array<td::tl_object_ptr<td::td_api::textEntity>>());
|
||||
* auto send_message_request = td::make_tl_object<td::td_api::sendMessage>(chat_id, 0, 0, nullptr, nullptr,
|
||||
* auto send_message_request = td::make_tl_object<td::td_api::sendMessage>(chat_id, 0, nullptr, nullptr, nullptr,
|
||||
* td::make_tl_object<td::td_api::inputMessageText>(std::move(message_text), false, true));
|
||||
* \endcode
|
||||
*
|
||||
|
@ -333,7 +333,7 @@ class UploadFile : public Task {
|
||||
write_file(content_path_, content_).ensure();
|
||||
|
||||
send_query(td::make_tl_object<td::td_api::sendMessage>(
|
||||
chat_id_, 0, 0, nullptr, nullptr,
|
||||
chat_id_, 0, nullptr, nullptr, nullptr,
|
||||
td::make_tl_object<td::td_api::inputMessageDocument>(
|
||||
td::make_tl_object<td::td_api::inputFileLocal>(content_path_), nullptr, true,
|
||||
td::make_tl_object<td::td_api::formattedText>("tag", td::Auto()))),
|
||||
|
@ -311,7 +311,7 @@ class SetUsername final : public TestClinetTask {
|
||||
CHECK(res->get_id() == td::td_api::chat::ID);
|
||||
auto chat = td::move_tl_object_as<td::td_api::chat>(res);
|
||||
this->send_query(td::make_tl_object<td::td_api::sendMessage>(
|
||||
chat->id_, 0, 0, nullptr, nullptr,
|
||||
chat->id_, 0, nullptr, nullptr, nullptr,
|
||||
td::make_tl_object<td::td_api::inputMessageText>(
|
||||
td::make_tl_object<td::td_api::formattedText>(PSTRING() << tag_ << " INIT", td::Auto()),
|
||||
false, false)),
|
||||
@ -382,7 +382,7 @@ class TestA final : public TestClinetTask {
|
||||
for (int i = 0; i < 20; i++) {
|
||||
this->send_query(
|
||||
td::make_tl_object<td::td_api::sendMessage>(
|
||||
chat->id_, 0, 0, nullptr, nullptr,
|
||||
chat->id_, 0, nullptr, nullptr, nullptr,
|
||||
td::make_tl_object<td::td_api::inputMessageText>(
|
||||
td::make_tl_object<td::td_api::formattedText>(PSTRING() << tag_ << " " << (1000 + i), td::Auto()),
|
||||
false, false)),
|
||||
@ -431,7 +431,7 @@ class TestSecretChat final : public TestClinetTask {
|
||||
for (int i = 0; i < 20; i++) {
|
||||
send_query(
|
||||
td::make_tl_object<td::td_api::sendMessage>(
|
||||
chat_id_, 0, 0, nullptr, nullptr,
|
||||
chat_id_, 0, nullptr, nullptr, nullptr,
|
||||
td::make_tl_object<td::td_api::inputMessageText>(
|
||||
td::make_tl_object<td::td_api::formattedText>(PSTRING() << tag_ << " " << (1000 + i), td::Auto()),
|
||||
false, false)),
|
||||
@ -495,7 +495,7 @@ class TestFileGenerated final : public TestClinetTask {
|
||||
file.flush_write().ensure(); // important
|
||||
file.close();
|
||||
send_query(td::make_tl_object<td::td_api::sendMessage>(
|
||||
chat_id_, 0, 0, nullptr, nullptr,
|
||||
chat_id_, 0, nullptr, nullptr, nullptr,
|
||||
td::make_tl_object<td::td_api::inputMessageDocument>(
|
||||
td::make_tl_object<td::td_api::inputFileGenerated>(file_path, "square", 0),
|
||||
td::make_tl_object<td::td_api::inputThumbnail>(
|
||||
@ -504,7 +504,7 @@ class TestFileGenerated final : public TestClinetTask {
|
||||
[](auto res) { check_td_error(res); });
|
||||
|
||||
send_query(td::make_tl_object<td::td_api::sendMessage>(
|
||||
chat_id_, 0, 0, nullptr, nullptr,
|
||||
chat_id_, 0, nullptr, nullptr, nullptr,
|
||||
td::make_tl_object<td::td_api::inputMessageDocument>(
|
||||
td::make_tl_object<td::td_api::inputFileGenerated>(file_path, "square", 0), nullptr, true,
|
||||
td::make_tl_object<td::td_api::formattedText>(tag_, td::Auto()))),
|
||||
@ -612,7 +612,7 @@ class CheckTestC final : public TestClinetTask {
|
||||
|
||||
void one_file() {
|
||||
send_query(td::make_tl_object<td::td_api::sendMessage>(
|
||||
chat_id_, 0, 0, nullptr, nullptr,
|
||||
chat_id_, 0, nullptr, nullptr, nullptr,
|
||||
td::make_tl_object<td::td_api::inputMessageText>(
|
||||
td::make_tl_object<td::td_api::formattedText>(PSTRING() << tag_ << " ONE_FILE", td::Auto()),
|
||||
false, false)),
|
||||
|
Loading…
Reference in New Issue
Block a user