mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-14 01:41:24 -06:00
fix: chatwoot screen
This commit is contained in:
parent
c20a3b643f
commit
80ae86b298
@ -13,6 +13,7 @@
|
||||
* Fixed use chatwoot with evolution channel
|
||||
* Fix chatwoot reply quote with Cloud API
|
||||
* Use exchange name from .env on RabbitMQ
|
||||
* Fixed chatwoot screen
|
||||
|
||||
# 2.1.0 (2024-08-26 15:33)
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
2
manager/dist/index.html
vendored
2
manager/dist/index.html
vendored
@ -5,7 +5,7 @@
|
||||
<link rel="icon" type="image/png" href="/assets/images/evolution-logo.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Evolution Manager</title>
|
||||
<script type="module" crossorigin src="/assets/index-B-Bdu2zN.js"></script>
|
||||
<script type="module" crossorigin src="/assets/index-DOHK1pp9.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-DNOCacL_.css">
|
||||
</head>
|
||||
<body>
|
||||
|
@ -46,6 +46,10 @@ export class InstanceController {
|
||||
providerFiles: this.providerFiles,
|
||||
});
|
||||
|
||||
if (!instance) {
|
||||
throw new BadRequestException('Invalid integration');
|
||||
}
|
||||
|
||||
const instanceId = v4();
|
||||
|
||||
instanceData.instanceId = instanceId;
|
||||
@ -62,6 +66,7 @@ export class InstanceController {
|
||||
hash,
|
||||
number: instanceData.number,
|
||||
businessId: instanceData.businessId,
|
||||
status: instanceData.status,
|
||||
});
|
||||
|
||||
instance.setInstance({
|
||||
@ -146,7 +151,7 @@ export class InstanceController {
|
||||
integration: instanceData.integration,
|
||||
webhookWaBusiness,
|
||||
accessTokenWaBusiness,
|
||||
status: 'created',
|
||||
status: instance.connectionStatus.state,
|
||||
},
|
||||
hash,
|
||||
webhook: {
|
||||
@ -233,7 +238,7 @@ export class InstanceController {
|
||||
integration: instanceData.integration,
|
||||
webhookWaBusiness,
|
||||
accessTokenWaBusiness,
|
||||
status: 'created',
|
||||
status: instance.connectionStatus.state,
|
||||
},
|
||||
hash,
|
||||
webhook: {
|
||||
|
@ -9,6 +9,7 @@ export class InstanceDto extends IntegrationDto {
|
||||
number?: string;
|
||||
integration?: string;
|
||||
token?: string;
|
||||
status?: string;
|
||||
// settings
|
||||
rejectCall?: boolean;
|
||||
msgCall?: string;
|
||||
|
@ -80,6 +80,7 @@ export class ChannelController {
|
||||
);
|
||||
}
|
||||
|
||||
if (instanceData.integration === Integration.WHATSAPP_BAILEYS) {
|
||||
return new BaileysStartupService(
|
||||
data.configService,
|
||||
data.eventEmitter,
|
||||
@ -90,4 +91,7 @@ export class ChannelController {
|
||||
data.providerFiles,
|
||||
);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
@ -118,13 +118,17 @@ export class WAMonitoringService {
|
||||
public async cleaningUp(instanceName: string) {
|
||||
let instanceDbId: string;
|
||||
if (this.db.SAVE_DATA.INSTANCE) {
|
||||
const findInstance = await this.prismaRepository.instance.findFirst({
|
||||
where: { name: instanceName },
|
||||
});
|
||||
|
||||
if (!findInstance) this.logger.error('Instance not found');
|
||||
|
||||
const instance = await this.prismaRepository.instance.update({
|
||||
where: { name: instanceName },
|
||||
data: { connectionStatus: 'close' },
|
||||
});
|
||||
|
||||
if (!instance) this.logger.error('Instance not found');
|
||||
|
||||
rmSync(join(INSTANCE_DIR, instance.id), { recursive: true, force: true });
|
||||
|
||||
instanceDbId = instance.id;
|
||||
@ -150,6 +154,8 @@ export class WAMonitoringService {
|
||||
where: { name: instanceName },
|
||||
});
|
||||
|
||||
if (!instance) return;
|
||||
|
||||
rmSync(join(INSTANCE_DIR, instance.id), { recursive: true, force: true });
|
||||
|
||||
await this.prismaRepository.session.deleteMany({ where: { sessionId: instance.id } });
|
||||
@ -194,7 +200,8 @@ export class WAMonitoringService {
|
||||
data: {
|
||||
id: data.instanceId,
|
||||
name: data.instanceName,
|
||||
connectionStatus: data.integration && data.integration === Integration.WHATSAPP_BAILEYS ? 'close' : 'open',
|
||||
connectionStatus:
|
||||
data.integration && data.integration === Integration.WHATSAPP_BAILEYS ? 'close' : data.status ?? 'open',
|
||||
number: data.number,
|
||||
integration: data.integration || Integration.WHATSAPP_BAILEYS,
|
||||
token: data.hash,
|
||||
@ -226,6 +233,8 @@ export class WAMonitoringService {
|
||||
providerFiles: this.providerFiles,
|
||||
});
|
||||
|
||||
if (!instance) return;
|
||||
|
||||
instance.setInstance({
|
||||
instanceId: instanceData.instanceId,
|
||||
instanceName: instanceData.instanceName,
|
||||
|
Loading…
Reference in New Issue
Block a user