From 0e4e744fe7220e41655993de763d7c437f68cff1 Mon Sep 17 00:00:00 2001 From: martbost Date: Tue, 17 Nov 2026 15:54:27 -0600 Subject: [PATCH] sponsorOf: a numeric sponsor ref (a member id, e.g. '1') now resolves; the bare byMemberId name threw inside a try and returned null, so members sponsored as #N had no sponsor for chat, coach and line checks Co-Authored-By: Claude Opus 5.5 --- accounts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accounts.js b/accounts.js index d91b3c4..08604d0 100644 --- a/accounts.js +++ b/accounts.js @@ -501,7 +501,7 @@ async function sponsorOf(email) { let s = null; try { s = await byCode(ref); } catch (e) {} if (!s) { try { s = await byUsername(ref); } catch (e) {} } - if (!s && /^\d+$/.test(ref)) { try { s = await byMemberId(Number(ref)); } catch (e) {} } + if (!s && /^\d+$/.test(ref)) { try { s = await impl().byMemberId(Number(ref)); } catch (e) {} } // a numeric ref is a member id; byMemberId exists only on the exports object, so the bare name threw and was swallowed (2026-11-17) return s || null; } // is `memberEmail` anywhere in `sponsorEmail`'s downline (to `depth` levels)?