fix(telegram): await_amount ignorado cuando conversación está en modo agente

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 <noreply@anthropic.com>
This commit is contained in:
Lizandro
2026-07-18 18:08:53 +00:00
co-authored by Claude Sonnet 4.6
parent 5ea4f3c9e5
commit 20d15a640c
+5 -1
View File
@@ -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
}
}
}
}