Skip to content

Commit 419300b

Browse files
committed
refactor: simplify edited message check in BaileysStartupService
1 parent d458c97 commit 419300b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/api/integrations/channel/whatsapp/whatsapp.baileys.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,7 +1078,7 @@ export class BaileysStartupService extends ChannelStartupService {
10781078
const editedMessage =
10791079
received?.message?.protocolMessage || received?.message?.editedMessage?.message?.protocolMessage;
10801080

1081-
if (received.message?.protocolMessage?.editedMessage && editedMessage) {
1081+
if (editedMessage) {
10821082
if (this.configService.get<Chatwoot>('CHATWOOT').ENABLED && this.localChatwoot?.enabled)
10831083
this.chatwootService.eventWhatsapp(
10841084
'messages.edit',
@@ -1126,7 +1126,7 @@ export class BaileysStartupService extends ChannelStartupService {
11261126

11271127
if (
11281128
(type !== 'notify' && type !== 'append') ||
1129-
received.message?.protocolMessage ||
1129+
editedMessage ||
11301130
received.message?.pollUpdateMessage ||
11311131
!received?.message
11321132
) {

0 commit comments

Comments
 (0)