Merge branch 'EvolutionAPI:v2.0.0' into v2.0.0

This commit is contained in:
Felipe Medeiros
2024-09-23 20:54:31 -03:00
committed by GitHub
16 changed files with 595 additions and 289 deletions

View File

@@ -736,19 +736,24 @@ export class BaileysStartupService extends ChannelStartupService {
},
});
const instance = { instanceName: this.instance.name, instanceId: this.instance.id };
if (this.configService.get<Chatwoot>('CHATWOOT').ENABLED && this.localChatwoot?.enabled) {
const instance = { instanceName: this.instance.name, instanceId: this.instance.id };
const findParticipant = await this.chatwootService.findContact(instance, contact.remoteJid.split('@')[0]);
const findParticipant = await this.chatwootService.findContact(
instance,
contact.remoteJid.split('@')[0],
);
if (!findParticipant) {
return;
if (!findParticipant) {
return;
}
this.chatwootService.updateContact(instance, findParticipant.id, {
name: contact.pushName,
avatar_url: contact.profilePicUrl,
});
}
this.chatwootService.updateContact(instance, findParticipant.id, {
name: contact.pushName,
avatar_url: contact.profilePicUrl,
});
return update;
}),
);