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;
|
||||
|
||||
Reference in New Issue
Block a user