Skip to content

Commit d3a83ba

Browse files
committed
fix: correction sending s3/minio media to chatwoot and typebot
1 parent 20fb66e commit d3a83ba

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

src/whatsapp/controllers/instance.controller.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { TypebotService } from '../services/typebot.service';
1919
import { WebhookService } from '../services/webhook.service';
2020
import { WebsocketService } from '../services/websocket.service';
2121
import { WAStartupService } from '../services/whatsapp.service';
22-
import { wa } from '../types/wa.types';
22+
import { Events, wa } from '../types/wa.types';
2323

2424
export class InstanceController {
2525
constructor(
@@ -87,6 +87,10 @@ export class InstanceController {
8787
const instance = new WAStartupService(this.configService, this.eventEmitter, this.repository, this.cache);
8888
instance.instanceName = instanceName;
8989

90+
instance.sendDataWebhook(Events.INSTANCE_CREATE, {
91+
instanceName,
92+
});
93+
9094
this.logger.verbose('instance: ' + instance.instanceName + ' created');
9195

9296
this.waMonitor.waInstances[instance.instanceName] = instance;

src/whatsapp/types/wa.types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { AuthenticationState, WAConnectionState } from '@whiskeysockets/baileys'
33

44
export enum Events {
55
APPLICATION_STARTUP = 'application.startup',
6+
INSTANCE_CREATE = 'instance.create',
67
QRCODE_UPDATED = 'qrcode.updated',
78
CONNECTION_UPDATE = 'connection.update',
89
STATUS_INSTANCE = 'status.instance',

0 commit comments

Comments
 (0)