Merge pull request #362 from aliazhar-id/aliazhar-patch-1

Fix: 'blocklist.update' was never emitted
This commit is contained in:
Alessandro Autiero
2023-10-09 09:56:14 +02:00
committed by GitHub

View File

@@ -392,7 +392,16 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
},
}
})
}
} 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 })
}
}
break
case 'link_code_companion_reg':