From 1a82e6d3f1ca52b823e2b1f0e16f6dbeb8a03b1a Mon Sep 17 00:00:00 2001 From: levlam Date: Thu, 12 Jul 2018 03:50:58 +0300 Subject: [PATCH] Add default values for message_text_length_max and message_caption_length_max options. GitOrigin-RevId: 4f2d3d087d17ec5e7aeb62933c5525a7e12d6ca7 --- td/telegram/Td.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/td/telegram/Td.cpp b/td/telegram/Td.cpp index 0cfa3219..f667a242 100644 --- a/td/telegram/Td.cpp +++ b/td/telegram/Td.cpp @@ -3995,6 +3995,13 @@ Status Td::init(DbKey key) { // options_.proxy = Proxy(); G()->set_mtproto_header(std::make_unique(options_)); + if (!G()->shared_config().have_option("message_text_length_max")) { + G()->shared_config().set_option_integer("message_text_length_max", 4096); + } + if (!G()->shared_config().have_option("message_caption_length_max")) { + G()->shared_config().set_option_integer("message_caption_length_max", 200); + } + VLOG(td_init) << "Create NetQueryDispatcher"; auto net_query_dispatcher = std::make_unique([&] { return create_reference(); }); G()->set_net_query_dispatcher(std::move(net_query_dispatcher));