From 6f0f40a29e6e558da2e957dccc312ac9a4bf2ca2 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 14:48:54 +0700 Subject: [PATCH] fix: send email text then attach docs separately without captions --- instruct/handlers.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/instruct/handlers.py b/instruct/handlers.py index 32a5648..e1f061d 100644 --- a/instruct/handlers.py +++ b/instruct/handlers.py @@ -447,8 +447,9 @@ async def instruct_router_handler(msg: Message): raw_mail = ad_info.get("raw_mail") if ad_info else None if raw_mail: text = INSTRUCT_EMAIL_AVAILABLE(EMOJI_DIGITS, cn, raw_mail) - # Отправляем первую инструкцию с текстом-подписью - first = True + # Отправляем текст сообщения + await msg.answer(text, parse_mode="html") + # Затем отправляем оба документа отдельно for instruct_path, file_name in [ (GMAIL_ANDROID_INSTRUCT_PATH, "Инструкция Android"), (APPLE_INSTRUCT_PATH, "Инструкция Apple"), @@ -457,10 +458,7 @@ async def instruct_router_handler(msg: Message): await msg.bot.send_document( chat_id=msg.chat_id, file=FSInputFile(instruct_path, file_name=file_name), - caption=text if first else None, - parse_mode="html" if first else None, ) - first = False else: text = INSTRUCT_EMAIL_UNAVAILABLE(EMOJI_DIGITS, cn) await msg.answer(text, parse_mode="html")