From f16102748cda141b21aa937b21b9e11853efe6b3 Mon Sep 17 00:00:00 2001 From: juanjo Date: Sun, 6 Sep 2026 17:54:57 +0200 Subject: [PATCH] 06-sep: [menu] cancelar reabre el menu + traza de edits fallidos --- vigilancia/menu_idd.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vigilancia/menu_idd.py b/vigilancia/menu_idd.py index cae3d8f..2d799f1 100644 --- a/vigilancia/menu_idd.py +++ b/vigilancia/menu_idd.py @@ -340,13 +340,16 @@ def teclado_cancelar(): def _enviar_edit(chat_id, message_id, texto, teclado): import requests try: - requests.post(_api("editMessageText"), data={ + r = requests.post(_api("editMessageText"), data={ "chat_id": chat_id, "message_id": message_id, "text": texto, "parse_mode": "HTML", "reply_markup": json.dumps(teclado), }, timeout=10) + d = r.json() + if not d.get("ok"): + _log(f"edit {message_id} fallo: {d.get('description')}") except Exception as e: _log(f"edit error: {e}") @@ -610,6 +613,7 @@ def procesar_callback(data, chat_id, message_id): if ruta == "cancelar": _limpiar_pendiente(chat_id) _borrar(chat_id, message_id) + _reenviar_menu(chat_id) return