From 20d15a640c4e9af706f80d28621c0f96ac86a3d0 Mon Sep 17 00:00:00 2001 From: Lizandro Date: Sat, 18 Jul 2026 18:08:53 +0000 Subject: [PATCH] =?UTF-8?q?fix(telegram):=20await=5Famount=20ignorado=20cu?= =?UTF-8?q?ando=20conversaci=C3=B3n=20est=C3=A1=20en=20modo=20agente?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit El check 'agente' devolvía silenciosamente antes de leer el step, descartando el texto '1000' del usuario. Si el bot está esperando input específico (await_amount, await_email, etc.) tiene prioridad sobre el estado agente de la conversación. Co-Authored-By: Claude Sonnet 4.6 --- app/Services/TelegramBotService.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/Services/TelegramBotService.php b/app/Services/TelegramBotService.php index 634d36e..9d2504c 100755 --- a/app/Services/TelegramBotService.php +++ b/app/Services/TelegramBotService.php @@ -58,7 +58,11 @@ class TelegramBotService $conv->update(['ultimo_mensaje_at' => now()]); if ($conv->estado === 'agente') { - return; // Human agent is handling this + // No interrumpir si el bot está esperando input específico del usuario + $inputSteps = ['await_email', 'await_otp', 'await_nombre', 'await_celular', 'await_amount']; + if (! in_array($state['step'] ?? '', $inputSteps)) { + return; // Human agent is handling this + } } } }