Clean Tg Update queu
jiren85 opened this issue · comments
Hello,
I've a question;
Is there in your lib a method to clean the telegram updates queue after I've received the update?
Thank you in advance.
Regards
Hi,
The update is automatically cleaned from the queue, if you handle it.
Do you want to discard all pending updates in the queue? Then no, there is currently no such function. However, you can do something like this:
Update::Ptr update = api.getUpdates(-1).front();
api.getUpdates(update->updateId + 1);
Great It's perfect.
Thank you so much.