From ea4b8679c9c5710be6ec03c900a551ae992fff7d Mon Sep 17 00:00:00 2001 From: Er2 Date: Mon, 31 Jan 2022 19:44:24 +0300 Subject: [PATCH] hmmm --- core.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core.lua b/core.lua index 04baaf5..e98e1b6 100644 --- a/core.lua +++ b/core.lua @@ -67,6 +67,10 @@ end function api:_getUpd(lim, offs, ...) local u, ok = self:getUpdates(lim, offs, ...) + if not ok then + -- fallback if very long message + return offs + 1 + end if not ok or not u or (u and type(u) ~= 'table') or not u.result then return end for _, v in pairs(u.result) do offs = v.update_id + 1