fix: reset nodo tras saludo + fallback por categoria 3

This commit is contained in:
Lizandro Guarnizo
2026-06-27 18:51:30 -05:00
parent b96dbcc394
commit 02108b7ffa
2 changed files with 8 additions and 3 deletions
+4 -3
View File
@@ -48,14 +48,15 @@ class NormalBot
$greeting = $perType['greeting'] ?? $config['greeting'] ?? null;
if ($greeting !== null && $currentNode === null) {
ConversationContext::updateNode($ctxId, 'greeting');
$greetingFlowId = $perType['greeting_flow'] ?? 'greeting';
if (isset($flows[$greetingFlowId])) {
ConversationContext::updateNode($ctxId, $greetingFlowId);
return self::handleFlow($flows[$greetingFlowId], $context, $company, $ctxId);
}
return self::sendText($greeting, $context['from'], $company);
$response = self::sendText($greeting, $context['from'], $company);
ConversationContext::updateNode($ctxId, null);
return $response;
}
$fallback = $perType['fallback'] ?? $config['fallback'] ?? null;