fix: added delay in chatwoot receive webhook

This commit is contained in:
Davidson Gomes 2023-09-04 16:13:43 -03:00
parent 41bea8931f
commit 2791f88b4c

View File

@ -945,6 +945,9 @@ export class ChatwootService {
public async receiveWebhook(instance: InstanceDto, body: any) {
try {
// espera 500ms para evitar duplicidade de mensagens
await new Promise((resolve) => setTimeout(resolve, 500));
this.logger.verbose('receive webhook to chatwoot instance: ' + instance.instanceName);
const client = await this.clientCw(instance);