mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
Merge branch 'WhiskeySockets:master' into master
This commit is contained in:
@@ -167,22 +167,17 @@ export const makeChatsSocket = (config: SocketConfig) => {
|
||||
}
|
||||
|
||||
const onWhatsApp = async(...jids: string[]) => {
|
||||
const results = await interactiveQuery(
|
||||
[
|
||||
{
|
||||
tag: 'user',
|
||||
attrs: {},
|
||||
content: jids.map(
|
||||
jid => ({
|
||||
tag: 'contact',
|
||||
attrs: {},
|
||||
content: `+${jid}`
|
||||
})
|
||||
)
|
||||
}
|
||||
],
|
||||
{ tag: 'contact', attrs: {} }
|
||||
)
|
||||
const query = { tag: 'contact', attrs: {} }
|
||||
const list = jids.map((jid) => ({
|
||||
tag: 'user',
|
||||
attrs: {},
|
||||
content: [{
|
||||
tag: 'contact',
|
||||
attrs: {},
|
||||
content: jid,
|
||||
}],
|
||||
}))
|
||||
const results = await interactiveQuery(list, query)
|
||||
|
||||
return results.map(user => {
|
||||
const contact = getBinaryNodeChild(user, 'contact')
|
||||
|
||||
Reference in New Issue
Block a user