mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
fix shouldIgnoreJid not receiving app state keys (#792)
This commit is contained in:
@@ -600,7 +600,7 @@ export const makeChatsSocket = (config: SocketConfig) => {
|
||||
const jid = attrs.from
|
||||
const participant = attrs.participant || attrs.from
|
||||
|
||||
if(shouldIgnoreJid(jid)) {
|
||||
if(shouldIgnoreJid(jid) && jid != '@s.whatsapp.net') {
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -574,7 +574,7 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
||||
participant: attrs.participant
|
||||
}
|
||||
|
||||
if(shouldIgnoreJid(remoteJid)) {
|
||||
if(shouldIgnoreJid(remoteJid) && remoteJid != '@s.whatsapp.net') {
|
||||
logger.debug({ remoteJid }, 'ignoring receipt from jid')
|
||||
await sendMessageAck(node)
|
||||
return
|
||||
@@ -651,7 +651,7 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
||||
|
||||
const handleNotification = async(node: BinaryNode) => {
|
||||
const remoteJid = node.attrs.from
|
||||
if(shouldIgnoreJid(remoteJid)) {
|
||||
if(shouldIgnoreJid(remoteJid) && remoteJid != '@s.whatsapp.net') {
|
||||
logger.debug({ remoteJid, id: node.attrs.id }, 'ignored notification')
|
||||
await sendMessageAck(node)
|
||||
return
|
||||
@@ -697,7 +697,7 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
||||
}
|
||||
}
|
||||
|
||||
if(shouldIgnoreJid(msg.key.remoteJid!)) {
|
||||
if(shouldIgnoreJid(msg.key.remoteJid!) && msg.key.remoteJid! != '@s.whatsapp.net') {
|
||||
logger.debug({ key: msg.key }, 'ignored message')
|
||||
await sendMessageAck(node)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user