alteração para enviar a ura dividida em 3 na primeira interação do numero

adriano 2023-05-04 15:42:37 -03:00
parent 2c9ae18a36
commit 1989ba5702
1 changed files with 14 additions and 1 deletions

View File

@ -817,13 +817,26 @@ const verifyQueue = async (
const body = `\u200e${greetingMessage}\n${options}`; const body = `\u200e${greetingMessage}\n${options}`;
// console.log('===========> body: ', body.split('\n'))
const debouncedSentMessage = debounce( const debouncedSentMessage = debounce(
async () => { async () => {
// const sentMessage = await wbot.sendMessage(`${contact.number}@c.us`, body); // const sentMessage = await wbot.sendMessage(`${contact.number}@c.us`, body);
// verifyMessage(sentMessage, ticket, contact); // verifyMessage(sentMessage, ticket, contact);
sendWhatsAppMessageSocket(ticket, body) let bodySplited = body.split('@')
bodySplited.forEach(e => {
if(e && e.trim().length>0){
console.log('ELEMENT e: ',e)
sendWhatsAppMessageSocket(ticket, e)
}
})
// sendWhatsAppMessageSocket(ticket, body)
}, },
3000, 3000,