reo7sp / tgbot-cpp

C++ library for Telegram bot API

Home Page:http://reo7sp.github.io/tgbot-cpp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

event onAnyMessage alway get old message received when first time run

ductai230894 opened this issue · comments

Hello sir,
I have problem with onAnyMessage, when I run, It always get old message first, any way to prevent this

Hello,
what exactly do you mean?
A user writes several messages while the bot is offline. Then the bot is started and the messages are received from old to new with onAnyMessage(). You want to receive the latest messages first?

No, this message already read by bot, but when run start again, bot continue read this message, this is old message, I test with listen message from channel, maybe I'm wrong, but bot always read old message which Bot already read it

This shouldn't happen. Do you have any example code to reproduce this problem?

this is example code, bot is admin in channel, bot already read message in channel, but when I run application again, bot continue read this message, I don't know why..
wait me 30 minute, I will capture video

above of while (1) { longpoll.start() } write this bot.getApi().deleteWebhook();