Skip to content

Commit d3fce5f

Browse files
committed
fix: Fixed problem of getting message when deleting message in chatwoot
1 parent 14f3f3d commit d3fce5f

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
### Fixed
44

55
* Fixed error return bug
6+
* Fixed problem of getting message when deleting message in chatwoot
67

78
# 1.4.6 (2023-07-26 17:54)
89

src/whatsapp/services/chatwoot.service.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -930,6 +930,7 @@ export class ChatwootService {
930930
}
931931

932932
public async receiveWebhook(instance: InstanceDto, body: any) {
933+
console.log(body);
933934
try {
934935
this.logger.verbose('receive webhook to chatwoot instance: ' + instance.instanceName);
935936
const client = await this.clientCw(instance);
@@ -940,7 +941,7 @@ export class ChatwootService {
940941
}
941942

942943
this.logger.verbose('check if is bot');
943-
if (!body?.conversation || body.private) return { message: 'bot' };
944+
if (!body?.conversation || body.private || body.event === 'message_updated') return { message: 'bot' };
944945

945946
this.logger.verbose('check if is group');
946947
const chatId =

0 commit comments

Comments
 (0)