From 0bc23e3830585d1340e1dbe42ca6fa332dabe696 Mon Sep 17 00:00:00 2001 From: Andrea Cavalli Date: Sun, 11 Feb 2024 12:55:43 +0100 Subject: [PATCH] Add custom deleteMessages implementation --- telegram-bot-api/Client.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/telegram-bot-api/Client.cpp b/telegram-bot-api/Client.cpp index c17d8efe4..7d545518d 100644 --- a/telegram-bot-api/Client.cpp +++ b/telegram-bot-api/Client.cpp @@ -10592,10 +10592,7 @@ td::Status Client::process_delete_message_query(PromisedQueryPtr &query) { } td::Status Client::process_delete_messages_query(PromisedQueryPtr &query) { - auto is_range_delete_query = query->arg("start").empty() && query->arg("end").empty(); - if (is_range_delete_query) { - return process_delete_messages_range_query(query); - } + if (!query->arg("start").empty() || !query->arg("end").empty()) return process_delete_messages_range_query(query); auto chat_id = query->arg("chat_id"); TRY_RESULT(message_ids, get_message_ids(query.get(), 100)); if (message_ids.empty()) {