From aaf395af345b58143fb720a50c8f9bdf9c00b1fa Mon Sep 17 00:00:00 2001 From: Lizandro Date: Sun, 19 Jul 2026 00:18:26 +0000 Subject: [PATCH] fix(telegram): eliminar checks de estado agente que silenciaban mensajes de voz MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Con el asesor removido, el estado 'agente' en conversación bloqueaba handleText y handleFreeText silenciosamente. Audio transcripto como 'hacer una recarga' no generaba respuesta por este return prematuro. Co-Authored-By: Claude Sonnet 4.6 --- app/Services/TelegramBotService.php | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/app/Services/TelegramBotService.php b/app/Services/TelegramBotService.php index 786dd84..02dd64e 100755 --- a/app/Services/TelegramBotService.php +++ b/app/Services/TelegramBotService.php @@ -56,14 +56,6 @@ class TelegramBotService 'leido' => false, ]); $conv->update(['ultimo_mensaje_at' => now()]); - - if ($conv->estado === 'agente') { - // 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 - } - } } } @@ -1292,13 +1284,6 @@ class TelegramBotService return; } - if ($state['conv_id'] ?? null) { - $conv = ChatConversation::find($state['conv_id']); - if ($conv && $conv->estado === 'agente') { - return; - } - } - // Intentar detectar intención con Gemini antes de mostrar menú $texto = $state['data']['last_text'] ?? ''; if ($texto) {