mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
@@ -318,7 +318,7 @@ export const extractGroupMetadata = (result: BinaryNode) => {
|
|||||||
|
|
||||||
const groupId = group.attrs.id.includes('@') ? group.attrs.id : jidEncode(group.attrs.id, 'g.us')
|
const groupId = group.attrs.id.includes('@') ? group.attrs.id : jidEncode(group.attrs.id, 'g.us')
|
||||||
const eph = getBinaryNodeChild(group, 'ephemeral')?.attrs.expiration
|
const eph = getBinaryNodeChild(group, 'ephemeral')?.attrs.expiration
|
||||||
const memberAddMode = getBinaryNodeChildString(group, 'member_add_mode') == "all_member_add"
|
const memberAddMode = getBinaryNodeChildString(group, 'member_add_mode') === 'all_member_add'
|
||||||
const metadata: GroupMetadata = {
|
const metadata: GroupMetadata = {
|
||||||
id: groupId,
|
id: groupId,
|
||||||
subject: group.attrs.subject,
|
subject: group.attrs.subject,
|
||||||
|
|||||||
@@ -392,16 +392,16 @@ export const makeMessagesRecvSocket = (config: SocketConfig) => {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else if (child.tag === 'blocklist') {
|
} else if(child.tag === 'blocklist') {
|
||||||
const blocklists = getBinaryNodeChildren(child, 'item')
|
const blocklists = getBinaryNodeChildren(child, 'item')
|
||||||
|
|
||||||
for(const { attrs } of blocklists) {
|
for(const { attrs } of blocklists) {
|
||||||
const blocklist = [attrs.jid]
|
const blocklist = [attrs.jid]
|
||||||
const type = (attrs.action === 'block') ? 'add' : 'remove'
|
const type = (attrs.action === 'block') ? 'add' : 'remove'
|
||||||
|
|
||||||
ev.emit('blocklist.update', { blocklist, type })
|
ev.emit('blocklist.update', { blocklist, type })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
break
|
break
|
||||||
case 'link_code_companion_reg':
|
case 'link_code_companion_reg':
|
||||||
|
|||||||
Reference in New Issue
Block a user