mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-25 22:57:44 -06:00
refactor: Remove unnecessary code for handling contact not in WhatsApp
The code changes in `whatsapp.baileys.service.ts` remove the unnecessary code that handles the case when a contact is not in WhatsApp. The code was previously sending a notification to Chatwoot, but it is no longer needed. This change improves the code by removing unnecessary complexity.
This commit is contained in:
@@ -1898,17 +1898,6 @@ export class BaileysStartupService extends ChannelStartupService {
|
||||
const isWA = (await this.whatsappNumber({ numbers: [number] }))?.shift();
|
||||
|
||||
if (!isWA.exists && !isJidGroup(isWA.jid) && !isWA.jid.includes('@broadcast')) {
|
||||
if (this.configService.get<Chatwoot>('CHATWOOT').ENABLED && this.localChatwoot?.enabled) {
|
||||
const body = {
|
||||
key: { remoteJid: isWA.jid },
|
||||
};
|
||||
|
||||
this.chatwootService.eventWhatsapp(
|
||||
'contact.is_not_in_wpp',
|
||||
{ instanceName: this.instance.name, instanceId: this.instance.id },
|
||||
body,
|
||||
);
|
||||
}
|
||||
throw new BadRequestException(isWA);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user