Fix: 'blocklist.update' was never emitted

This commit is contained in:
aliazhar
2023-09-03 14:31:08 +07:00
parent cd8542ff7c
commit 11291e61d0

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':