mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-27 07:37:44 -06:00
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:
@@ -47,6 +47,7 @@ export class NatsController extends EventController implements EventControllerIn
|
||||
sender,
|
||||
apiKey,
|
||||
integration,
|
||||
extra,
|
||||
}: EmitData): Promise<void> {
|
||||
if (integration && !integration.includes('nats')) {
|
||||
return;
|
||||
@@ -72,6 +73,7 @@ export class NatsController extends EventController implements EventControllerIn
|
||||
date_time: dateTime,
|
||||
sender,
|
||||
apikey: apiKey,
|
||||
...extra,
|
||||
};
|
||||
|
||||
// Instância específica
|
||||
|
||||
Reference in New Issue
Block a user