Quiet hub accounts (Marty 2026-11-14, join one = join all): accounts the hub makes here get joinedRef 'hub', and accounts.listAll leaves out hub-made accounts that never signed in unless { shells: true }, so no mailing or sweep (updates 'all', launch week, coach, leaderboard) reaches them. hubsync/launchweek/sponsorfollow/tank-cap tests pass

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-11-14 09:10:11 -06:00
parent 42cbe96979
commit fb84d1545d
3 changed files with 11 additions and 3 deletions
+2 -1
View File
@@ -93,7 +93,8 @@ async function place(p, depth, seen) {
try { await R.registry.upsert({ email: e, username: p.username || null, wallet: p.wallet || null, sponsorEmail: sp ? sp.email : null, joinedAt: p.firstDoor && p.firstDoor.at, firstProperty: (p.firstDoor && p.firstDoor.site) || 'network' }); } catch (err) {}
}
let a = await R.accounts.byEmail(e);
if (!a) { const x = await R.accounts.ensure(e, '', 'carried', 'network'); if (x.created) { const st = load(); st.stats.shells++; st.made[e] = (p.firstDoor && p.firstDoor.site) || 'network'; } a = await R.accounts.byEmail(e); }
// joinedRef 'hub' (2026-11-14): a quiet waiting account the hub made; accounts.listAll leaves it out of every mailing until they sign in
if (!a) { const x = await R.accounts.ensure(e, '', 'carried', 'hub'); if (x.created) { const st = load(); st.stats.shells++; st.made[e] = (p.firstDoor && p.firstDoor.site) || 'network'; } a = await R.accounts.byEmail(e); }
if (!a) return null;
if (p.username && !a.username) { try { const r = await R.accounts.setUsername(e, p.username); if (r && !r.error) load().stats.filled++; } catch (err) {} }
if (sp && norm(sp.email) !== e) {