From 012baea21ea81aae07ce676ae71f1e6e4806074a Mon Sep 17 00:00:00 2001 From: adriano Date: Thu, 4 May 2023 18:17:27 -0300 Subject: [PATCH] =?UTF-8?q?Corre=C3=A7=C3=A3o=20do=20menu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/services/WbotServices/wbotMessageListener.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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