Open ehussain opened 1 year ago
The best way to handle it - listen to webhooks and save information in your database and query it
How do we get the messages that was received on phone when session was not connected? How do we sync those messages with our database?
You can get like limit 1000 and search new messages there. If you can get more than 1000 new messages while the session is off - I think you should look at the official API, they give much more stability.
Btw, from what I saw before - if the session is stopped and started after certain time - it'll send all "missed" messages to a webhook (if you use the same session, not a new one by scanning QR)
Hello,
Currently /api/messages api has parameter named 'limit' that represents count of messages that you need. However we would like to receive messages only which falls within datetime range. So we only get the latest messages after specific timestamp.
Thank you.