From 9fe9e8958a0da0cdbdfeb12d8af2c135e61462ff Mon Sep 17 00:00:00 2001 From: "Andrew K. Choi" Date: Sat, 7 Mar 2026 09:46:09 +0900 Subject: [PATCH] Fix HTML parse_mode in registration handlers to support premium emojis - Replace Markdown double asterisks with HTML tags - Change parse_mode from Markdown to HTML for registration confirmation - Use tags for bold text in registration_completed message - Use tags for verification code display - Fixes 'Can't find end of the entity' error in Telegram API - Remove unused JSON export files --- export_20260208_174031.json | 9 --------- export_20260208_174208.json | 9 --------- export_20260208_174221.json | 9 --------- src/handlers/registration_handlers.py | 8 ++++---- 4 files changed, 4 insertions(+), 31 deletions(-) delete mode 100644 export_20260208_174031.json delete mode 100644 export_20260208_174208.json delete mode 100644 export_20260208_174221.json diff --git a/export_20260208_174031.json b/export_20260208_174031.json deleted file mode 100644 index a4b5941..0000000 --- a/export_20260208_174031.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "export_date": "2026-02-08T17:40:31.898764", - "statistics": { - "users": 3, - "lotteries": 1, - "participations": 1, - "winners": 0 - } -} \ No newline at end of file diff --git a/export_20260208_174208.json b/export_20260208_174208.json deleted file mode 100644 index cb8ae81..0000000 --- a/export_20260208_174208.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "export_date": "2026-02-08T17:42:08.014799", - "statistics": { - "users": 3, - "lotteries": 1, - "participations": 1, - "winners": 0 - } -} \ No newline at end of file diff --git a/export_20260208_174221.json b/export_20260208_174221.json deleted file mode 100644 index be48977..0000000 --- a/export_20260208_174221.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "export_date": "2026-02-08T17:42:21.844218", - "statistics": { - "users": 3, - "lotteries": 1, - "participations": 1, - "winners": 0 - } -} \ No newline at end of file diff --git a/src/handlers/registration_handlers.py b/src/handlers/registration_handlers.py index 9c03af1..83981b0 100644 --- a/src/handlers/registration_handlers.py +++ b/src/handlers/registration_handlers.py @@ -184,12 +184,12 @@ async def process_phone(message: Message, state: FSMContext): "✅ Регистрация завершена!\n\n" f"🎭 Никнейм: {user.nickname}\n" f"🎫 Клубная карта: {user.club_card_number}\n" - f"🔑 Ваш код верификации: **{user.verification_code}**\n\n" + f"🔑 Ваш код верификации: {user.verification_code}\n\n" "⚠️ Сохраните этот код! Он понадобится для подтверждения выигрыша.\n\n" "Теперь вы можете участвовать в розыгрышах!" ) - await message.answer(text, parse_mode="Markdown") + await message.answer(text, parse_mode="HTML") await state.clear() except ValueError as e: @@ -215,12 +215,12 @@ async def show_verification_code(message: Message): text = ( "🔑 Ваш код верификации:\n\n" - f"**{user.verification_code}**\n\n" + f"{user.verification_code}\n\n" "Этот код используется для подтверждения выигрыша.\n" "Сообщите его администратору при получении приза." ) - await message.answer(text, parse_mode="Markdown") + await message.answer(text, parse_mode="HTML") @router.message(Command("my_accounts"))