[Feature Request] Repeat all messages from X to Y (or to the latest one) - history sync
We need to have an endpoint using which we can ask system to "reconcile" all "missed" messages during that period and send it via webhook.
It'll contain both new and old messages, so it should be a new message.reconcile event and we'll send it in the batch in case of huge history
message.reconcile Itβs a very good event Looking forward to using it soon
Added in 2024.10.9
https://waha.devlike.pro/docs/how-to/chats/#get-messages
GET /api/{session}/chats/{chatId}/messages?limit=10
Available parameters:
downloadMedia=true- download media files (images, files) or not[email protected]- chatId, phone numberchatId=all- get messages from all chats (works on NOWEBengine only)
limit=100- limit the number of chats to returnoffset=0- skip the number of chats from the startfilter.timestamp.lte=1727745026- filter messages by timestamp less than or equal to1727745026filter.timestamp.gte=1727745026- filter messages by timestamp greater than or equal to1727745026filter.fromMe=false- filter messages from me (by default shows all messages)
Get 10 messages from 1727745026 timestamp, not from me
GET /api/{session}/chats/{chatId}/messages?limit=10&filter.timestamp.gte=1727745026&filter.fromMe=false
π If you have more messages - you can set offset flag
(increase it always for limit amount, even if you get less messages)
GET /api/{session}/chats/{chatId}/messages?limit=10&offset=10&filter.timestamp.gte=1727745026&filter.fromMe=false
It would be amazing to have a way to fetch directly from WhatsApp's servers, not relying on WAHA's database. In our usecase, we keep emptying out the WAHA database to save on storage, but then might need it later in the future. Whatsmeow exposes it with BuildHistorySyncRequest and baileys with fetchMessageHistory
@devlikepro I've created a separate issue #1544