From 1c5ae4eb4d3f583c5137d733bee27b45f7f0b6dc Mon Sep 17 00:00:00 2001 From: Davidson Gomes Date: Thu, 13 Jul 2023 20:12:29 -0300 Subject: [PATCH] fix: optimize send message from group with mentions --- src/whatsapp/services/chatwoot.service.ts | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/whatsapp/services/chatwoot.service.ts b/src/whatsapp/services/chatwoot.service.ts index 76e2d3ff..df35fa92 100644 --- a/src/whatsapp/services/chatwoot.service.ts +++ b/src/whatsapp/services/chatwoot.service.ts @@ -98,11 +98,11 @@ export class ChatwootService { const client = await this.clientCw(instance); if (!client) { - throw new Error('client not found'); + console.log('client not found'); } if (!id) { - throw new Error('id is required'); + console.log('id is required'); } const contact = await client.contact.getContactable({ @@ -126,7 +126,7 @@ export class ChatwootService { const client = await this.clientCw(instance); if (!client) { - throw new Error('client not found'); + console.log('client not found'); } const findInbox: any = await client.inboxes.list({ @@ -208,7 +208,7 @@ export class ChatwootService { const client = await this.clientCw(instance); if (!client) { - throw new Error('client not found'); + console.log('client not found'); } let data: any = {}; @@ -241,11 +241,11 @@ export class ChatwootService { const client = await this.clientCw(instance); if (!client) { - throw new Error('client not found'); + console.log('client not found'); } if (!id) { - throw new Error('id is required'); + console.log('id is required'); } const contact = await client.contacts.update({ @@ -261,7 +261,7 @@ export class ChatwootService { const client = await this.clientCw(instance); if (!client) { - throw new Error('client not found'); + console.log('client not found'); } let query: any; @@ -289,7 +289,7 @@ export class ChatwootService { const client = await this.clientCw(instance); if (!client) { - throw new Error('client not found'); + console.log('client not found'); } const isGroup = body.key.remoteJid.includes('@g.us'); @@ -371,7 +371,7 @@ export class ChatwootService { const client = await this.clientCw(instance); if (!client) { - throw new Error('client not found'); + console.log('client not found'); } const inbox = (await client.inboxes.list({ @@ -610,7 +610,7 @@ export class ChatwootService { return; } catch (error) { - throw new Error(error); + console.log(error); } } @@ -803,7 +803,7 @@ export class ChatwootService { const client = await this.clientCw(instance); if (!client) { - throw new Error('client not found'); + console.log('client not found'); } const waInstance = this.waMonitor.waInstances[instance.instanceName];