Fix brackets in chats.ts

This commit is contained in:
Emanuele Ingrosso
2023-07-26 09:17:19 +02:00
committed by Codeboss
parent 1d57f38323
commit a977d20310

View File

@@ -168,7 +168,7 @@ export const makeChatsSocket = (config: SocketConfig) => {
const onWhatsApp = async(...jids: string[]) => {
const query = { tag: 'contact', attrs: {} }
const list = jids.map((jid) => (
const list = jids.map((jid) => {
const content = (!jid.startsWith('+')) ? `+${jid}` : jid;
return {
@@ -180,7 +180,7 @@ export const makeChatsSocket = (config: SocketConfig) => {
content,
}],
}
))
})
const results = await interactiveQuery(list, query)
return results.map(user => {