From bdc8ef52e99b10a1bcc07f744da5d5914355595d Mon Sep 17 00:00:00 2001 From: levlam Date: Sat, 7 Nov 2020 19:31:00 +0300 Subject: [PATCH 1/4] Fix possible CE. --- telegram-bot-api/Client.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/telegram-bot-api/Client.h b/telegram-bot-api/Client.h index 2abf934..b748fbb 100644 --- a/telegram-bot-api/Client.h +++ b/telegram-bot-api/Client.h @@ -386,11 +386,11 @@ class Client : public WebhookActor::Callback { static td::Result get_required_string_arg(const Query *query, Slice field_name); - static int64 get_message_id(const Query *query, Slice field_name = "message_id"); + static int64 get_message_id(const Query *query, Slice field_name = Slice("message_id")); - static td::Result get_inline_message_id(const Query *query, Slice field_name = "inline_message_id"); + static td::Result get_inline_message_id(const Query *query, Slice field_name = Slice("inline_message_id")); - static td::Result get_user_id(const Query *query, Slice field_name = "user_id"); + static td::Result get_user_id(const Query *query, Slice field_name = Slice("user_id")); int64 extract_yet_unsent_message_query_id(int64 chat_id, int64 message_id, bool *is_reply_to_message_deleted); From 94846848b7b1c9db380825123997e49fbe3ebd58 Mon Sep 17 00:00:00 2001 From: levlam Date: Sat, 7 Nov 2020 19:34:08 +0300 Subject: [PATCH 2/4] Make Client.start_up private. --- telegram-bot-api/Client.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/telegram-bot-api/Client.h b/telegram-bot-api/Client.h index b748fbb..eb1ecff 100644 --- a/telegram-bot-api/Client.h +++ b/telegram-bot-api/Client.h @@ -41,8 +41,6 @@ class Client : public WebhookActor::Callback { Client(td::ActorShared<> parent, const td::string &bot_token, bool is_test_dc, td::int64 tqueue_id, std::shared_ptr parameters, td::ActorId stat_actor); - void start_up() override; - void send(PromisedQueryPtr query) override; void close(); @@ -517,6 +515,8 @@ class Client : public WebhookActor::Callback { void long_poll_wakeup(bool force_flag); + void start_up() override; + void raw_event(const td::Event::Raw &event) override; void loop() override; From fbb8b4ce377afb4065b0dc4d1becbf555948c3d4 Mon Sep 17 00:00:00 2001 From: levlam Date: Sun, 8 Nov 2020 12:10:27 +0300 Subject: [PATCH 3/4] Update TDLib. --- td | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/td b/td index ff0c727..b21d667 160000 --- a/td +++ b/td @@ -1 +1 @@ -Subproject commit ff0c727ee2129b66a2908e46edc3bc9f7774e834 +Subproject commit b21d667bdfb13df15f249896155f98f175a89657 From cbd974f850e4ed76346f8a4087b3370f8b96ae05 Mon Sep 17 00:00:00 2001 From: levlam Date: Sun, 8 Nov 2020 14:01:44 +0300 Subject: [PATCH 4/4] Update TDLib. --- CMakeLists.txt | 4 ++-- td | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2d34610..7df120f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,7 +48,7 @@ if (CLANG OR GCC) endif() endif() -set(TG_HTTP_CLIENT_SOURCE +set(TELEGRAM_BOT_API_SOURCE telegram-bot-api/telegram-bot-api.cpp telegram-bot-api/Client.cpp @@ -70,7 +70,7 @@ set(TG_HTTP_CLIENT_SOURCE telegram-bot-api/WebhookActor.h ) -add_executable(telegram-bot-api ${TG_HTTP_CLIENT_SOURCE}) +add_executable(telegram-bot-api ${TELEGRAM_BOT_API_SOURCE}) target_include_directories(telegram-bot-api PRIVATE $) target_link_libraries(telegram-bot-api PRIVATE memprof tdactor tdcore tddb tdnet tdutils) diff --git a/td b/td index b21d667..f9a600c 160000 --- a/td +++ b/td @@ -1 +1 @@ -Subproject commit b21d667bdfb13df15f249896155f98f175a89657 +Subproject commit f9a600c401ba20af7e07ee60e12b1de28dd2e14c