[core] Fix missing first message - GOWS, NOWEB

This commit is contained in:
devlikepro committed 2025-05-05 13:08:35 +07:00
1 parent f96e6420fc
commit c0b8bacab0
2 files changed
+15 -4

No files matched your search

+8 -2
View File
@@ -4,6 +4,7 @@ import {
getUrlFromDirectPath,
isJidGroup,
jidNormalizedUser,
normalizeMessageContent,
} from '@adiwajshing/baileys';
import * as grpc from '@grpc/grpc-js';
import { connectivityState } from '@grpc/grpc-js';
@@ -1395,8 +1396,13 @@ export class WhatsappSessionGoWSCore extends WhatsappSession {
if (message.Message.pollUpdateMessage) return;
// Ignore protocol messages
if (message.Message.protocolMessage) return;
// Ignore key distribution messages
if (message.Message.senderKeyDistributionMessage) return;
const normalizedContent = normalizeMessageContent(message.Message);
const hasSomeContent = !!getContentType(normalizedContent);
if (!hasSomeContent) {
// Ignore key distribution messages
if (message.message.senderKeyDistributionMessage) return;
}
if (downloadMedia) {
try {
+7 -2
View File
@@ -1984,8 +1984,13 @@ export class WhatsappSessionNoWebCore extends WhatsappSession {
proto.Message.ProtocolMessage.Type.EPHEMERAL_SYNC_RESPONSE
)
return;
// Ignore key distribution messages
if (message.message.senderKeyDistributionMessage) return;
const normalizedContent = normalizeMessageContent(message.message);
const hasSomeContent = !!getContentType(normalizedContent);
if (!hasSomeContent) {
// Ignore key distribution messages
if (message.message.senderKeyDistributionMessage) return;
}
if (downloadMedia) {
try {