[core] Fix missing first message - GOWS, NOWEB
This commit is contained in:
1 parent
f96e6420fc
commit
c0b8bacab0
2 files changed
+15
-4
No files matched your search
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user