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
|
* Fixed use chatwoot with evolution channel
|
||||||
* Fix chatwoot reply quote with Cloud API
|
* Fix chatwoot reply quote with Cloud API
|
||||||
* Use exchange name from .env on RabbitMQ
|
* Use exchange name from .env on RabbitMQ
|
||||||
|
* Fixed chatwoot screen
|
||||||
|
|
||||||
# 2.1.0 (2024-08-26 15:33)
|
# 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" />
|
<link rel="icon" type="image/png" href="/assets/images/evolution-logo.png" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>Evolution Manager</title>
|
<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">
|
<link rel="stylesheet" crossorigin href="/assets/index-DNOCacL_.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
@ -46,6 +46,10 @@ export class InstanceController {
|
|||||||
providerFiles: this.providerFiles,
|
providerFiles: this.providerFiles,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (!instance) {
|
||||||
|
throw new BadRequestException('Invalid integration');
|
||||||
|
}
|
||||||
|
|
||||||
const instanceId = v4();
|
const instanceId = v4();
|
||||||
|
|
||||||
instanceData.instanceId = instanceId;
|
instanceData.instanceId = instanceId;
|
||||||
@ -62,6 +66,7 @@ export class InstanceController {
|
|||||||
hash,
|
hash,
|
||||||
number: instanceData.number,
|
number: instanceData.number,
|
||||||
businessId: instanceData.businessId,
|
businessId: instanceData.businessId,
|
||||||
|
status: instanceData.status,
|
||||||
});
|
});
|
||||||
|
|
||||||
instance.setInstance({
|
instance.setInstance({
|
||||||
@ -146,7 +151,7 @@ export class InstanceController {
|
|||||||
integration: instanceData.integration,
|
integration: instanceData.integration,
|
||||||
webhookWaBusiness,
|
webhookWaBusiness,
|
||||||
accessTokenWaBusiness,
|
accessTokenWaBusiness,
|
||||||
status: 'created',
|
status: instance.connectionStatus.state,
|
||||||
},
|
},
|
||||||
hash,
|
hash,
|
||||||
webhook: {
|
webhook: {
|
||||||
@ -233,7 +238,7 @@ export class InstanceController {
|
|||||||
integration: instanceData.integration,
|
integration: instanceData.integration,
|
||||||
webhookWaBusiness,
|
webhookWaBusiness,
|
||||||
accessTokenWaBusiness,
|
accessTokenWaBusiness,
|
||||||
status: 'created',
|
status: instance.connectionStatus.state,
|
||||||
},
|
},
|
||||||
hash,
|
hash,
|
||||||
webhook: {
|
webhook: {
|
||||||
|
@ -9,6 +9,7 @@ export class InstanceDto extends IntegrationDto {
|
|||||||
number?: string;
|
number?: string;
|
||||||
integration?: string;
|
integration?: string;
|
||||||
token?: string;
|
token?: string;
|
||||||
|
status?: string;
|
||||||
// settings
|
// settings
|
||||||
rejectCall?: boolean;
|
rejectCall?: boolean;
|
||||||
msgCall?: string;
|
msgCall?: string;
|
||||||
|
@ -80,14 +80,18 @@ export class ChannelController {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new BaileysStartupService(
|
if (instanceData.integration === Integration.WHATSAPP_BAILEYS) {
|
||||||
data.configService,
|
return new BaileysStartupService(
|
||||||
data.eventEmitter,
|
data.configService,
|
||||||
data.prismaRepository,
|
data.eventEmitter,
|
||||||
data.cache,
|
data.prismaRepository,
|
||||||
data.chatwootCache,
|
data.cache,
|
||||||
data.baileysCache,
|
data.chatwootCache,
|
||||||
data.providerFiles,
|
data.baileysCache,
|
||||||
);
|
data.providerFiles,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -118,13 +118,17 @@ export class WAMonitoringService {
|
|||||||
public async cleaningUp(instanceName: string) {
|
public async cleaningUp(instanceName: string) {
|
||||||
let instanceDbId: string;
|
let instanceDbId: string;
|
||||||
if (this.db.SAVE_DATA.INSTANCE) {
|
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({
|
const instance = await this.prismaRepository.instance.update({
|
||||||
where: { name: instanceName },
|
where: { name: instanceName },
|
||||||
data: { connectionStatus: 'close' },
|
data: { connectionStatus: 'close' },
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!instance) this.logger.error('Instance not found');
|
|
||||||
|
|
||||||
rmSync(join(INSTANCE_DIR, instance.id), { recursive: true, force: true });
|
rmSync(join(INSTANCE_DIR, instance.id), { recursive: true, force: true });
|
||||||
|
|
||||||
instanceDbId = instance.id;
|
instanceDbId = instance.id;
|
||||||
@ -150,6 +154,8 @@ export class WAMonitoringService {
|
|||||||
where: { name: instanceName },
|
where: { name: instanceName },
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (!instance) return;
|
||||||
|
|
||||||
rmSync(join(INSTANCE_DIR, instance.id), { recursive: true, force: true });
|
rmSync(join(INSTANCE_DIR, instance.id), { recursive: true, force: true });
|
||||||
|
|
||||||
await this.prismaRepository.session.deleteMany({ where: { sessionId: instance.id } });
|
await this.prismaRepository.session.deleteMany({ where: { sessionId: instance.id } });
|
||||||
@ -194,7 +200,8 @@ export class WAMonitoringService {
|
|||||||
data: {
|
data: {
|
||||||
id: data.instanceId,
|
id: data.instanceId,
|
||||||
name: data.instanceName,
|
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,
|
number: data.number,
|
||||||
integration: data.integration || Integration.WHATSAPP_BAILEYS,
|
integration: data.integration || Integration.WHATSAPP_BAILEYS,
|
||||||
token: data.hash,
|
token: data.hash,
|
||||||
@ -226,6 +233,8 @@ export class WAMonitoringService {
|
|||||||
providerFiles: this.providerFiles,
|
providerFiles: this.providerFiles,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (!instance) return;
|
||||||
|
|
||||||
instance.setInstance({
|
instance.setInstance({
|
||||||
instanceId: instanceData.instanceId,
|
instanceId: instanceData.instanceId,
|
||||||
instanceName: instanceData.instanceName,
|
instanceName: instanceData.instanceName,
|
||||||
|
Loading…
Reference in New Issue
Block a user