mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-29 18:13:47 +00:00
fix: use short 12-char code in bot and cabinet share links
GIFTCODE_ prefix (9 chars) + full 64-char token = 73 chars, exceeding Telegram's 64-char start parameter limit. Now all share links use the same short code shown in the UI (first 12 chars). Backend already supports prefix-based lookup.
This commit is contained in:
@@ -982,9 +982,10 @@ function ShareModal({ gift, onClose }: { gift: SentGift; onClose: () => void })
|
||||
};
|
||||
}, [onClose]);
|
||||
|
||||
const shortCode = gift.token.slice(0, 12);
|
||||
const botUsername = import.meta.env.VITE_TELEGRAM_BOT_USERNAME as string | undefined;
|
||||
const botLink = botUsername ? `https://t.me/${botUsername}?start=GIFTCODE_${gift.token}` : null;
|
||||
const cabinetLink = `${window.location.origin}/gift?tab=activate&code=${gift.token}`;
|
||||
const botLink = botUsername ? `https://t.me/${botUsername}?start=GIFTCODE_${shortCode}` : null;
|
||||
const cabinetLink = `${window.location.origin}/gift?tab=activate&code=${shortCode}`;
|
||||
|
||||
const fullMessage = [
|
||||
t('gift.shareText'),
|
||||
|
||||
Reference in New Issue
Block a user