fix: correction sending s3/minio media to chatwoot and typebot

This commit is contained in:
Davidson Gomes 2023-12-14 15:35:17 -03:00
parent 20fb66e2f7
commit d3a83ba89e
2 changed files with 6 additions and 1 deletions

View File

@ -19,7 +19,7 @@ import { TypebotService } from '../services/typebot.service';
import { WebhookService } from '../services/webhook.service';
import { WebsocketService } from '../services/websocket.service';
import { WAStartupService } from '../services/whatsapp.service';
import { wa } from '../types/wa.types';
import { Events, wa } from '../types/wa.types';
export class InstanceController {
constructor(
@ -87,6 +87,10 @@ export class InstanceController {
const instance = new WAStartupService(this.configService, this.eventEmitter, this.repository, this.cache);
instance.instanceName = instanceName;
instance.sendDataWebhook(Events.INSTANCE_CREATE, {
instanceName,
});
this.logger.verbose('instance: ' + instance.instanceName + ' created');
this.waMonitor.waInstances[instance.instanceName] = instance;

View File

@ -3,6 +3,7 @@ import { AuthenticationState, WAConnectionState } from '@whiskeysockets/baileys'
export enum Events {
APPLICATION_STARTUP = 'application.startup',
INSTANCE_CREATE = 'instance.create',
QRCODE_UPDATED = 'qrcode.updated',
CONNECTION_UPDATE = 'connection.update',
STATUS_INSTANCE = 'status.instance',