From 19372e2c5f0ed25a8d939bfe1f34d931712ce97a Mon Sep 17 00:00:00 2001 From: ruben Date: Sat, 13 Apr 2024 11:25:10 +0100 Subject: [PATCH] Update default values for GetUpdates --- .../longpolling/util/DefaultGetUpdatesGenerator.java | 4 ++-- .../telegrambots/meta/api/methods/updates/GetUpdates.java | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/telegrambots-longpolling/src/main/java/org/telegram/telegrambots/longpolling/util/DefaultGetUpdatesGenerator.java b/telegrambots-longpolling/src/main/java/org/telegram/telegrambots/longpolling/util/DefaultGetUpdatesGenerator.java index 0978dad7c..e6fc612e7 100644 --- a/telegrambots-longpolling/src/main/java/org/telegram/telegrambots/longpolling/util/DefaultGetUpdatesGenerator.java +++ b/telegrambots-longpolling/src/main/java/org/telegram/telegrambots/longpolling/util/DefaultGetUpdatesGenerator.java @@ -11,8 +11,8 @@ @AllArgsConstructor @NoArgsConstructor public class DefaultGetUpdatesGenerator implements Function { - private static final int GET_UPDATES_LIMIT = 1; - private static final int GET_UPDATES_TIMEOUT = 1; + private static final int GET_UPDATES_LIMIT = 100; + private static final int GET_UPDATES_TIMEOUT = 50; private List allowedUpdates = new ArrayList<>(); diff --git a/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/updates/GetUpdates.java b/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/updates/GetUpdates.java index ef8bc7d62..1d4dc4877 100644 --- a/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/updates/GetUpdates.java +++ b/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/updates/GetUpdates.java @@ -65,9 +65,7 @@ public class GetUpdates extends BotApiMethod>{ * For example, specify ["message", "edited_channel_post", "callback_query"] to only receive updates of these types. * See Update for a complete list of available update types. Specify an empty list to receive all update types except * chat_member, message_reaction, and message_reaction_count (default). - * * If not specified, the previous setting will be used. - * * Please note that this parameter doesn't affect updates created before the call to the getUpdates, * so unwanted updates may be received for a short period of time. */