This commit is contained in:
Er2 2022-01-31 19:44:24 +03:00
parent 5e6f1b9ec7
commit ea4b8679c9

View file

@ -67,6 +67,10 @@ end
function api:_getUpd(lim, offs, ...) function api:_getUpd(lim, offs, ...)
local u, ok = self:getUpdates(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 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 for _, v in pairs(u.result) do
offs = v.update_id + 1 offs = v.update_id + 1