Open milanaleksic opened 6 years ago
I don't know if it needs the ID check in the updates loop, has anyone ever seen their bot get the same update twice?
If that's not an issue, removing that should fix it.
I've been trying to track down this issue for several months now. Reimplemented GetUpdatesChan in my own code without id check, everything seems to be working fine.
I've checked several other bot frameworks (https://github.com/tucnak/telebot/, https://github.com/olebedev/go-tgbot) and it looks like there is no id checking there.
Any updates here? Is id check gonna be removed in master branch? It really bites.
Skipping updates became way too annoying. If anyone have an idea how we can tackle the issue it'd be greatly appreciated.
what's a problem use !=
in if
statement instead >
? I mean use in getUpdateChan func
if update.UpdateID != config.Offset {
config.Offset = update.UpdateID
ch <- update
}
Hello Kinda late to the party. But once again, is there a problem with removing this if statement? Along side what @variar said, I checked the C# Library and Python and there is no sign of comparing the update ID.
Hi,
I think I have encountered a bug in the
getUpdates
handler. What happens is following: if my bot doesn't receive a message for a longer period of time, then it breaks on a first message by going into endless loop.Behavior
Here is the app log (with debug turned on):
Only after the restart is this message processed and new messages can come in.
Cause
Based on this text from page https://core.telegram.org/bots/api I believe this is the cause (it's beside the
update_id
)So, as you can see the id of the update is not any more higher than the offset, but lower, thus a problem arises since the message is not sent at all to the update message handler
I think there are 2 bugs here in fact: