fix(telegram): eliminar checks de estado agente que silenciaban mensajes de voz
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 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
eb448794c5
commit
aaf395af34
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user