fix: Fixed problem of getting message when deleting message in chatwoot

This commit is contained in:
Davidson Gomes 2023-07-27 08:45:02 -03:00
parent 14f3f3d2ac
commit d3fce5fc89
2 changed files with 3 additions and 1 deletions

View File

@ -3,6 +3,7 @@
### Fixed ### Fixed
* Fixed error return bug * Fixed error return bug
* Fixed problem of getting message when deleting message in chatwoot
# 1.4.6 (2023-07-26 17:54) # 1.4.6 (2023-07-26 17:54)

View File

@ -930,6 +930,7 @@ export class ChatwootService {
} }
public async receiveWebhook(instance: InstanceDto, body: any) { public async receiveWebhook(instance: InstanceDto, body: any) {
console.log(body);
try { try {
this.logger.verbose('receive webhook to chatwoot instance: ' + instance.instanceName); this.logger.verbose('receive webhook to chatwoot instance: ' + instance.instanceName);
const client = await this.clientCw(instance); const client = await this.clientCw(instance);
@ -940,7 +941,7 @@ export class ChatwootService {
} }
this.logger.verbose('check if is bot'); this.logger.verbose('check if is bot');
if (!body?.conversation || body.private) return { message: 'bot' }; if (!body?.conversation || body.private || body.event === 'message_updated') return { message: 'bot' };
this.logger.verbose('check if is group'); this.logger.verbose('check if is group');
const chatId = const chatId =