Skip to content

Commit 96e1802

Browse files
author
Jesus
committed
Fix update message condition
1 parent 27dc49f commit 96e1802

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1281,8 +1281,6 @@ export class BaileysStartupService extends ChannelStartupService {
12811281
return;
12821282
}
12831283

1284-
//if (status[update.status] === 'READ' && !key.fromMe) return;
1285-
12861284
if (update.message === null && update.status === undefined) {
12871285
this.sendDataWebhook(Events.MESSAGES_DELETE, key);
12881286

@@ -1310,8 +1308,8 @@ export class BaileysStartupService extends ChannelStartupService {
13101308
}
13111309

13121310
return;
1313-
} else if (update.message !== undefined && update.message !== findMessage.status) {
1314-
if (unreadChatToUpdate[key.remoteJid!] === undefined) {
1311+
} else if (update.status !== undefined && status[update.status] !== findMessage.status) {
1312+
if (!unreadChatToUpdate[key.remoteJid!]) {
13151313
unreadChatToUpdate[key.remoteJid!] = 0;
13161314
}
13171315

0 commit comments

Comments
 (0)