Update messages-recv.ts

This commit is contained in:
azudin
2023-12-02 07:37:35 +08:00
committed by GitHub
parent ece99eab23
commit 4b3841d202

View File

@@ -392,14 +392,13 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
},
}
})
} else if (child.tag === 'blocklist') {
} else if(child.tag === 'blocklist') {
const blocklists = getBinaryNodeChildren(child, 'item')
for(const { attrs } of blocklists) {
const blocklist = [attrs.jid]
const type = (attrs.action === 'block') ? 'add' : 'remove'
ev.emit('blocklist.update', { blocklist, type })
const blocklist = [attrs.jid]
const type = (attrs.action === 'block') ? 'add' : 'remove'
ev.emit('blocklist.update', { blocklist, type })
}
}