From 1585206707c49e26a78b324360222bcdf0e502df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B5=D0=BD=D0=B8=D1=81=20=D0=9A=D1=80=D0=B8=D0=B2?= =?UTF-8?q?=D0=BE=D1=87=D0=B5=D0=BD=D0=BA=D0=BE?= Date: Thu, 30 Jul 2026 12:37:54 +0700 Subject: [PATCH] fix: attach TrueConf instruction docx when ticket already exists (no 2FA) --- instruct/handlers.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/instruct/handlers.py b/instruct/handlers.py index 2f4024d..772c7ff 100644 --- a/instruct/handlers.py +++ b/instruct/handlers.py @@ -412,7 +412,15 @@ async def instruct_router_handler(msg: Message): if existing_ticket: set_state(user_id, "INSTRUCT_TRUECONF_VIEW") text = INSTRUCT_TRUECONF_WITH_AD(EMOJI_DIGITS, cn, existing_ticket) - await msg.answer(text, parse_mode="html") + if os.path.isfile(TRUECONF_INSTRUCT_PATH): + await msg.bot.send_document( + chat_id=msg.chat_id, + file=FSInputFile(TRUECONF_INSTRUCT_PATH, file_name="Инструкция.docx"), + caption=text, + parse_mode="html" + ) + else: + await msg.answer(text, parse_mode="html") else: set_state(user_id, "INSTRUCT_TRUECONF_PENDING") text = INSTRUCT_TRUECONF_PENDING_TEXT(EMOJI_DIGITS, cn)