From 6f1c9ff8ca0104d4519fbad270faed2ae5f50c1a Mon Sep 17 00:00:00 2001 From: martbost Date: Wed, 16 Sep 2026 18:11:12 -0500 Subject: [PATCH] New members are signed in to their inbox right after registering, so the profile gate actually fires Found by checking the live data: 59 positions registered in the 36h to 2026-09-16 and not one has a profile row, including #785 which registered 20 minutes after the gate deployed. The join flow redirects to /my/ but the member arrives with no inbox session, so the gate never runs and the leader still cannot reach them. join-now.js now takes the one free personal_sign immediately after the registration confirms, while the wallet is still connected, which is the cheapest moment to ask. Best-effort: declining does not block the join, and they are asked again on their next sign-in. Co-Authored-By: Claude Opus 5 (1M context) --- public/join-now.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/public/join-now.js b/public/join-now.js index 3d60542..9f6daa9 100644 --- a/public/join-now.js +++ b/public/join-now.js @@ -77,6 +77,22 @@ fetch('/api/public/config').then(function(r){return r.json()}).then(function(c){ } var lastBal=null; + // One free signature straight after the join, while the wallet is still connected: + // it opens their inbox session so the member-profile gate can ask for a username + // and email on the dashboard. Best-effort — if they decline, the join still stands + // and they are asked again the first time they sign in. + async function signInNewMember(newId){ + try{ + $('resultSub').innerHTML='Welcome to the team! One free signature sets up your member profile…'; + var ch=await (await fetch('/api/public/msg-challenge',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({address:account})})).json(); + if(!ch||!ch.message) return; + var hex='0x'; for(var i=0,b=new TextEncoder().encode(ch.message);i#'+newId+'. Redirecting to your dashboard…','ok'); try{ el_scroll('result'); }catch(e){} try{sessionStorage.setItem('rmc.fresh','1');}catch(e){} + signInNewMember(newId); setTimeout(function(){ location.href='/my/'+newId; }, 4500); } else { log('Confirmed on-chain. Open your dashboard at /my and enter your new ID (also shown on Polygonscan).','ok');