diff --git a/src/Socket/messages-recv.ts b/src/Socket/messages-recv.ts index 1c4d93a..5ed6a7a 100644 --- a/src/Socket/messages-recv.ts +++ b/src/Socket/messages-recv.ts @@ -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':