mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-25 06:37:45 -06:00
chore: Simplified payloads and instance endpoint
This commit is contained in:
@@ -369,6 +369,15 @@ export class BaileysStartupService extends ChannelStartupService {
|
||||
status: 'closed',
|
||||
});
|
||||
|
||||
if (this.configService.get<Database>('DATABASE').ENABLED) {
|
||||
await this.prismaRepository.instance.update({
|
||||
where: { id: this.instanceId },
|
||||
data: {
|
||||
connectionStatus: 'close',
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
if (this.configService.get<Chatwoot>('CHATWOOT').ENABLED && this.localChatwoot.enabled) {
|
||||
this.chatwootService.eventWhatsapp(
|
||||
Events.STATUS_INSTANCE,
|
||||
@@ -404,6 +413,17 @@ export class BaileysStartupService extends ChannelStartupService {
|
||||
`,
|
||||
);
|
||||
|
||||
if (this.configService.get<Database>('DATABASE').ENABLED) {
|
||||
await this.prismaRepository.instance.update({
|
||||
where: { id: this.instanceId },
|
||||
data: {
|
||||
ownerJid: this.instance.wuid,
|
||||
profilePicUrl: this.instance.profilePictureUrl,
|
||||
connectionStatus: 'open',
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
if (this.configService.get<Chatwoot>('CHATWOOT').ENABLED && this.localChatwoot.enabled) {
|
||||
this.chatwootService.eventWhatsapp(
|
||||
Events.CONNECTION_UPDATE,
|
||||
|
||||
Reference in New Issue
Block a user