From 3384d7050d24b132b61f459fabc3429952db8d5f Mon Sep 17 00:00:00 2001 From: naftali100 <48069590+naftali100@users.noreply.github.com> Date: Sun, 30 Oct 2022 20:03:46 +0200 Subject: [PATCH] add missing limit params --- telegram-bot-api/Client.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/telegram-bot-api/Client.cpp b/telegram-bot-api/Client.cpp index 1effe2a..a9ac816 100644 --- a/telegram-bot-api/Client.cpp +++ b/telegram-bot-api/Client.cpp @@ -9654,7 +9654,9 @@ td::Status Client::process_disable_proxy_query(PromisedQueryPtr &query) { td::Status Client::process_get_chats_query(PromisedQueryPtr &query) { CHECK_IS_USER(); - send_request(make_object(make_object(), 100), + td::int32 limit = get_integer_arg(query.get(), "limit", 100, 0, 100); + + send_request(make_object(make_object(), limit), td::make_unique(this, std::move(query))); return Status::OK(); } @@ -9663,8 +9665,9 @@ td::Status Client::process_get_common_chats_query(PromisedQueryPtr &query) { CHECK_IS_USER(); TRY_RESULT(user_id, get_user_id(query.get())); td::int64 offset_chat_id = get_integer_arg(query.get(), "offset_chat_id", 0); + td::int32 limit = get_integer_arg(query.get(), "limit", 100, 0, 100); - send_request(make_object(user_id, offset_chat_id, 100), + send_request(make_object(user_id, offset_chat_id, limit), td::make_unique(this, std::move(query))); return Status::OK(); }