Mini App: tapping your OWN invite link previews the prospect view
Linked members were always routed to their dashboard, so a sponsor could never see their angle page through their own t.me link. Now ref == own id -> /join/<id>?src=miniapp-preview (+angle); a teammate's link still opens the dashboard. links command notes the preview trick. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
+7
-1
@@ -39,7 +39,13 @@
|
||||
method: 'POST', headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ initData: tg.initData })
|
||||
}).then(function (r) { return r.json(); }).then(function (d) {
|
||||
if (d && d.ok && d.linked) { location.replace('/my/' + d.id); return; }
|
||||
if (d && d.ok && d.linked) {
|
||||
// A member tapping their OWN invite link wants to preview what their
|
||||
// prospects see — show the squeeze page (tagged so stats stay clean).
|
||||
// Tapping a teammate's link still lands on their own dashboard.
|
||||
if (ref && String(d.id) === ref) { location.replace('/join/' + ref + '?src=miniapp-preview' + (angle ? '&v=' + angle : '')); return; }
|
||||
location.replace('/my/' + d.id); return;
|
||||
}
|
||||
if (d && d.ok) {
|
||||
if (ref) { location.replace('/join/' + ref + '?src=miniapp' + (angle ? '&v=' + angle : '')); return; }
|
||||
show('st-unlinked'); return;
|
||||
|
||||
@@ -230,7 +230,7 @@ function linksText(id) {
|
||||
const ma = miniAppInvite(id);
|
||||
return `🔗 Your links, #${id} (each one credits YOU):\n\n` +
|
||||
`Moving invite link (routes to whoever needs help next in your leg):\n${b}/join/${id}\n\n` +
|
||||
(ma ? `⚡ Telegram-native invite — opens instantly INSIDE Telegram (best for sharing in groups and DMs here):\n${ma}\n\n` : '') +
|
||||
(ma ? `⚡ Telegram-native invite — opens instantly INSIDE Telegram (best for sharing in groups and DMs here):\n${ma}\n(Tap it yourself to preview exactly what your prospects will see.)\n\n` : '') +
|
||||
`Angle-matched links — pick the hook that fits your person:\n` +
|
||||
`💸 Pocket Change: ${b}/join/${id}?v=pocket\n` +
|
||||
`📱 Your Phone: ${b}/join/${id}?v=phone\n` +
|
||||
|
||||
Reference in New Issue
Block a user