mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
chore: ignore presence updates as well
This commit is contained in:
@@ -14,9 +14,10 @@ export const makeChatsSocket = (config: SocketConfig) => {
|
|||||||
const {
|
const {
|
||||||
logger,
|
logger,
|
||||||
markOnlineOnConnect,
|
markOnlineOnConnect,
|
||||||
shouldSyncHistoryMessage,
|
|
||||||
fireInitQueries,
|
fireInitQueries,
|
||||||
appStateMacVerification,
|
appStateMacVerification,
|
||||||
|
shouldIgnoreJid,
|
||||||
|
shouldSyncHistoryMessage,
|
||||||
} = config
|
} = config
|
||||||
const sock = makeSocket(config)
|
const sock = makeSocket(config)
|
||||||
const {
|
const {
|
||||||
@@ -508,6 +509,11 @@ export const makeChatsSocket = (config: SocketConfig) => {
|
|||||||
let presence: PresenceData | undefined
|
let presence: PresenceData | undefined
|
||||||
const jid = attrs.from
|
const jid = attrs.from
|
||||||
const participant = attrs.participant || attrs.from
|
const participant = attrs.participant || attrs.from
|
||||||
|
|
||||||
|
if(shouldIgnoreJid(jid)) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if(tag === 'presence') {
|
if(tag === 'presence') {
|
||||||
presence = {
|
presence = {
|
||||||
lastKnownPresence: attrs.type === 'unavailable' ? 'unavailable' : 'available',
|
lastKnownPresence: attrs.type === 'unavailable' ? 'unavailable' : 'available',
|
||||||
|
|||||||
Reference in New Issue
Block a user