fix: agregar comando 'salir' y limpiar __api_vars en reset de comandos
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
fe048f53a3
commit
79d2399ddf
@@ -25,7 +25,7 @@ class NormalBot
|
|||||||
// Clear any in-progress multi-step state so the command is a clean reset
|
// Clear any in-progress multi-step state so the command is a clean reset
|
||||||
$m = ConversationContext::getMetadata($ctxId);
|
$m = ConversationContext::getMetadata($ctxId);
|
||||||
$dirty = false;
|
$dirty = false;
|
||||||
foreach (['collecting', '__foreach', '__cap'] as $stateKey) {
|
foreach (['collecting', '__foreach', '__cap', '__api_vars', '__ep_vars', '__ep_vars_flat'] as $stateKey) {
|
||||||
if (isset($m[$stateKey])) { unset($m[$stateKey]); $dirty = true; }
|
if (isset($m[$stateKey])) { unset($m[$stateKey]); $dirty = true; }
|
||||||
}
|
}
|
||||||
if ($dirty) ConversationContext::updateMetadata($ctxId, $m);
|
if ($dirty) ConversationContext::updateMetadata($ctxId, $m);
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ $configJson = [
|
|||||||
'info' => 'enviar_informacion',
|
'info' => 'enviar_informacion',
|
||||||
'inicio' => 'show_main_menu',
|
'inicio' => 'show_main_menu',
|
||||||
'volver' => 'show_main_menu',
|
'volver' => 'show_main_menu',
|
||||||
|
'salir' => 'show_main_menu',
|
||||||
],
|
],
|
||||||
// ── Menus globales ──────────────────────────────────────────────────────
|
// ── Menus globales ──────────────────────────────────────────────────────
|
||||||
'menus' => [
|
'menus' => [
|
||||||
|
|||||||
Reference in New Issue
Block a user