diff --git a/backend/src/services/WbotServices/wbotMessageListener.ts b/backend/src/services/WbotServices/wbotMessageListener.ts index c782cb5..1f0616b 100644 --- a/backend/src/services/WbotServices/wbotMessageListener.ts +++ b/backend/src/services/WbotServices/wbotMessageListener.ts @@ -601,8 +601,11 @@ const sendDialogflowAwswer = async ( startDialog: boolean = false ) => { - if (startDialog) + if (startDialog){ msg.body = 'menu' + console.log('<--------------------- VOLTOU AO MENU ---------------->') + } + console.log('uuuuuuuuuuuuuuuuuuuuuuuuuuu 04') @@ -674,6 +677,7 @@ const verifyQueue = async ( let selectedOption = null; let choosenQueue = null + let aceppt = false //Habilitar esse caso queira usar o bot let botInfo = await BotIsOnQueue('botqueue', contact.accept) @@ -712,6 +716,8 @@ const verifyQueue = async ( await contact.update({ accept: true }); + aceppt = true + botInfo = await BotIsOnQueue('botqueue') choosenQueue = await ShowQueueService(botInfo.botQueueId); @@ -766,7 +772,7 @@ const verifyQueue = async ( console.log('uuuuuuuuuuuuuuuuuuuuuuuuuuu 3') const chat = wbot.chat - await sendDialogflowAwswer(wbot, _ticket, msg, contact, chat, true); + await sendDialogflowAwswer(wbot, _ticket, msg, contact, chat, aceppt); console.log('uuuuuuuuuuuuuuuuuuuuuuuuuuu 03') return