fix: referral links now clickable — remove <code> wrapping

The invite message wrapped the entire text including the referral URL
in <blockquote><code>...</code></blockquote>. The <code> tag made the
URL non-clickable — Telegram renders it as monospace copyable text.
Recipients couldn't tap the link to open it.

- Invite message: removed <code> from blockquote, Telegram now auto-links the URL
- Stats panel: removed <code> from bot/cabinet referral links, URLs are now clickable
This commit is contained in:
Fringg
2026-04-29 07:45:28 +03:00
parent a506c6be00
commit 43dd0fd92c
+3 -4
View File
@@ -120,8 +120,7 @@ async def show_referral_info(callback: types.CallbackQuery, db_user: User, db: A
# Show bot link # Show bot link
referral_text += ( referral_text += (
texts.t('REFERRAL_BOT_LINK_TITLE', '🤖 <b>Ссылка на бота:</b>') texts.t('REFERRAL_BOT_LINK_TITLE', '🤖 <b>Ссылка на бота:</b>') + f'\n{html_escape(bot_referral_link)}\n'
+ f'\n<code>{html_escape(bot_referral_link)}</code>\n'
) )
# Show cabinet link if configured # Show cabinet link if configured
@@ -129,7 +128,7 @@ async def show_referral_info(callback: types.CallbackQuery, db_user: User, db: A
referral_text += ( referral_text += (
'\n' '\n'
+ texts.t('REFERRAL_CABINET_LINK_TITLE', '🌐 <b>Ссылка на кабинет:</b>') + texts.t('REFERRAL_CABINET_LINK_TITLE', '🌐 <b>Ссылка на кабинет:</b>')
+ f'\n<code>{html_escape(cabinet_referral_link)}</code>\n' + f'\n{html_escape(cabinet_referral_link)}\n'
) )
referral_text += ( referral_text += (
@@ -551,7 +550,7 @@ async def create_invite_message(callback: types.CallbackQuery, db_user: User):
'Нажмите на текст ниже, чтобы скопировать:', 'Нажмите на текст ниже, чтобы скопировать:',
) )
+ '\n\n' + '\n\n'
f'<blockquote><code>{html_escape(invite_text)}</code></blockquote>' f'<blockquote>{html_escape(invite_text)}</blockquote>'
), ),
keyboard, keyboard,
) )