feat(events): add isLatest and progress to messages.set event

- Add extra field to EmitData type for additional payload properties
- Update EventManager and sendDataWebhook to support extra parameters
- Update all event controllers (webhook, rabbitmq, sqs, websocket, pusher, kafka, nats) to include extra fields in payload
- Pass isLatest and progress from Baileys messaging-history.set to messages.set webhook

This allows consumers to know when the history sync is complete (isLatest=true) and track sync progress percentage.
This commit is contained in:
Alexandre Martins
2025-11-26 15:44:18 -03:00
parent df20c5fc93
commit fa6b5c28a6
11 changed files with 23 additions and 3 deletions

View File

@@ -121,6 +121,7 @@ export class PusherController extends EventController implements EventController
apiKey,
local,
integration,
extra,
}: EmitData): Promise<void> {
if (integration && !integration.includes('pusher')) {
return;
@@ -141,6 +142,7 @@ export class PusherController extends EventController implements EventController
sender,
server_url: serverUrl,
apikey: apiKey,
...extra,
};
if (event == 'qrcode.updated') {
delete pusherData.data.qrcode.base64;