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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user