xtrime-ru / TelegramApiServer

Fast, simple, async php telegram api server: MadelineProto + Amp HTTP Server
https://tg.i-c-a.su
MIT License
529 stars 116 forks source link

Problem receiving messages after specific message id #147

Closed artin1982 closed 4 months ago

artin1982 commented 4 months ago

Hi Alexander, I hope you are ok ...

Imagine a channel has 10000 messages and I want to receive 20 messages from message id 8000 (mean message id: 8001 - 8020 )

this is my request : http://127.0.0.1:9503/api/Session_ID/getHistory/?data[peer]=CHANNEL_USERNAME&data[limit]=20&data[min_id]=8000

but it returns latest 20 messages (mean 9980 - 10000 ) not (8001 - 8020 )

xtrime-ru commented 4 months ago

Please read this doc: https://core.telegram.org/api/offsets

min_id is for additional filtering only, you need offset_id.