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 + } } } }