From 98ebcb35cc97902d8609ad891e30dff9979adb73 Mon Sep 17 00:00:00 2001 From: martbost Date: Sat, 1 Aug 2026 11:58:36 -0500 Subject: [PATCH] ref= with an empty chain now falls back to the COMPANY ref MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A valid CTB member whose self+upline program-73 entries are both empty was keeping their raw CTB username as the ClickBaitPays ref (a nonexistent CBP account would eat the signups — Marty caught it live with ?ref=r0705243024). Now: endpoint code no_entry (or its reason string) -> ref=cryptoteambuild, hub aligned to the member, fix-it nudge shown. Unknown values still pass through verbatim for genuine legacy CBP usernames. Co-Authored-By: Claude Fable 5 --- index.html | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/index.html b/index.html index 9537293..019615e 100644 --- a/index.html +++ b/index.html @@ -2422,7 +2422,19 @@ async function resolveIdentity() { IDENT.cbp = f.cbpUsername; IDENT.ctb = f.ctbUsername; if (f.source === 'sponsor') IDENT.uplineFallback = true; + } else if (f.code === 'no_entry' || /no clickbaitpays entry/i.test(f.reason || '')) { + // The value IS a valid CTB member but their whole chain (self + + // upline) has no ClickBaitPays entry: per the fallback rule the + // signup ref goes to the COMPANY account — never the raw CTB + // username (a non-existent ClickBaitPays ref would eat signups; + // Marty caught this live with ?ref=r0705243024). Hub still aligns + // to the member, and the nudge tells them how to claim their refs. + IDENT.ctb = IDENT.cbp; + IDENT.cbp = 'cryptoteambuild'; + IDENT.fallback = true; } + // Any other miss: the value is treated as a genuine ClickBaitPays + // username from a legacy link and kept verbatim. } } } catch (e) {