My line: your directs' email (with copy), where they came from (referrer + ?src= tag) and how they joined, up front in 'Your line', the Activity drop-down and the three-level card; levels 2-3 never get emails (Marty 2026-11-12: 'it was kind of buried in there'). Search also matches email + source. qa/line-origin.mjs (11 checks). Chatbot fact. my.js/site.css ?v=20261112ln
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2411,7 +2411,7 @@ const server = http.createServer(async (req, res) => {
|
||||
const r = await drip.unsubscribe(u.searchParams.get('e'), u.searchParams.get('t'));
|
||||
const msg = r.error ? r.error : 'Done. You will not get any more emails from InstantAdPay, apart from sign-in codes you ask for and receipts for payments to or from your account. Your account is unchanged.';
|
||||
res.writeHead(r.error ? 400 : 200, baseHeaders({ 'Content-Type': 'text/html; charset=utf-8', 'Cache-Control': 'no-store' }));
|
||||
return res.end('<!doctype html><html' + themehead.htmlAttr('dark') + '><head><meta charset="utf-8"><title>InstantAdPay</title>' + themehead.tag() + '<link rel="stylesheet" href="/assets/site.css?v=20261112q"></head><body><div class="wrap" style="max-width:560px;padding:80px 22px"><a href="/"><img src="/logo.png" alt="InstantAdPay" style="height:34px"></a><h1 style="font-size:30px;margin:26px 0 12px">' + (r.error ? 'Hmm.' : 'Unsubscribed.') + '</h1><p>' + msg + '</p><p><a class="btn small sec" href="/my">Member area</a></p></div></body></html>');
|
||||
return res.end('<!doctype html><html' + themehead.htmlAttr('dark') + '><head><meta charset="utf-8"><title>InstantAdPay</title>' + themehead.tag() + '<link rel="stylesheet" href="/assets/site.css?v=20261112ln"></head><body><div class="wrap" style="max-width:560px;padding:80px 22px"><a href="/"><img src="/logo.png" alt="InstantAdPay" style="height:34px"></a><h1 style="font-size:30px;margin:26px 0 12px">' + (r.error ? 'Hmm.' : 'Unsubscribed.') + '</h1><p>' + msg + '</p><p><a class="btn small sec" href="/my">Member area</a></p></div></body></html>');
|
||||
}
|
||||
|
||||
// -- public API
|
||||
@@ -3097,6 +3097,9 @@ const server = http.createServer(async (req, res) => {
|
||||
const rTot = await ads.earnedTotals(joined.map(r => r.email)); // surf earnings per referral (Marty, 2026-09-29)
|
||||
out.referrals = joined.map(r => ({
|
||||
name: r.username || r.email.replace(/^(.).*(@.*)$/, '$1***$2'), // username, else privacy mask
|
||||
// directs only (this list IS the member's directs): email, where they came from and how they joined, up front in
|
||||
// "Your line" instead of buried in the three-level card (Marty, 2026-11-12)
|
||||
email: r.email, src: r.joinedRef || null, via: r.joinedVia || null, ref: r.code || null,
|
||||
joined: r.created,
|
||||
lastSeen: r.lastSeen || 0,
|
||||
wallet: !!r.address, activated: !!r.memberId,
|
||||
@@ -4734,6 +4737,7 @@ const server = http.createServer(async (req, res) => {
|
||||
name: m.username ? '@' + m.username : m.memberId ? 'member #' + m.memberId : 'member',
|
||||
ref: m.code || null, // opens the activity drop-down (Clinton's ask, 2026-09-14): any of the three levels
|
||||
email: L.level === 1 ? m.email : null, // directs only
|
||||
src: L.level === 1 ? (m.joinedRef || null) : null, via: L.level === 1 ? (m.joinedVia || null) : null, // where a direct came from (2026-11-12)
|
||||
joined: m.created,
|
||||
lastSeen: m.lastSeen || 0,
|
||||
wallet: !!m.address, activated: !!m.memberId,
|
||||
@@ -4765,6 +4769,8 @@ const server = http.createServer(async (req, res) => {
|
||||
try { out.directs = ((await accounts.downline(a.email, 1))[0] || { members: [] }).members.length; } catch (e) { out.directs = 0; }
|
||||
try { out.badges = await ads.milestonesOf(a.email); } catch (e) { out.badges = []; }
|
||||
try { out.positions = (await accounts.positions(a.email)).length; } catch (e) { out.positions = 0; }
|
||||
// your own directs: contact + origin (Marty, 2026-11-12). Levels 2 and 3 belong to someone else's direct relationship: no email.
|
||||
try { if (await accounts.isDownlineOf(s.email, a.email, 1)) { out.direct = true; out.email = a.email; out.src = a.joinedRef || null; out.via = a.joinedVia || null; } } catch (e) {}
|
||||
return json(res, 200, out);
|
||||
}
|
||||
// -- broadcast a message to your downline (1/day), on-site inbox + email
|
||||
@@ -6133,7 +6139,7 @@ const server = http.createServer(async (req, res) => {
|
||||
+ '<meta name="description" content="' + esc(desc) + '"><link rel="canonical" href="' + url + '"><meta name="robots" content="noindex">'
|
||||
+ '<meta property="og:type" content="website"><meta property="og:site_name" content="InstantAdPay"><meta property="og:title" content="' + esc(title) + '"><meta property="og:description" content="' + esc(desc) + '"><meta property="og:url" content="' + url + '"><meta property="og:image" content="' + img + '"><meta property="og:image:width" content="1024"><meta property="og:image:height" content="1024">'
|
||||
+ '<meta name="twitter:card" content="summary_large_image"><meta name="twitter:title" content="' + esc(title) + '"><meta name="twitter:description" content="' + esc(desc) + '"><meta name="twitter:image" content="' + img + '">'
|
||||
+ '<link rel="icon" type="image/png" href="/logo-icon.png"><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Sora:wght@600;700;800&display=swap">' + themehead.tag() + '<link rel="stylesheet" href="/assets/site.css?v=20261112q">'
|
||||
+ '<link rel="icon" type="image/png" href="/logo-icon.png"><link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Sora:wght@600;700;800&display=swap">' + themehead.tag() + '<link rel="stylesheet" href="/assets/site.css?v=20261112ln">'
|
||||
+ '<style>.bp{max-width:560px;text-align:center;padding:40px 16px 60px}.bp img{width:100%;max-width:520px;border-radius:18px;border:1px solid var(--line);box-shadow:0 20px 60px rgba(0,0,0,.45)}.bp h1{font-size:clamp(24px,5vw,34px);margin:22px 0 8px}.bp p{color:var(--muted);max-width:44ch;margin:0 auto 20px}</style></head>'
|
||||
+ '<body><div class="wrap bp"><img src="' + img + '" alt="' + esc(label) + ' badge for @' + esc(un) + '"><h1>@' + esc(un) + ' unlocked <em>' + label + '</em></h1><p>' + esc(sub.charAt(0).toUpperCase() + sub.slice(1)) + '. On InstantAdPay every ad package that sells pays the sponsor in the same transaction, straight to their wallet, on-chain.</p>'
|
||||
+ '<a class="btn" href="/join/' + esc(un) + '">Join @' + esc(un) + '\u2019s line free</a><p class="small" style="margin-top:26px">Advertising with a performance referral program. Not an investment; no income is guaranteed.</p></div>'
|
||||
@@ -6199,7 +6205,7 @@ const server = http.createServer(async (req, res) => {
|
||||
let a = await accounts.byUsername(tok); if (!a) a = await accounts.byCode(tok);
|
||||
// a deleted or never-seen name is a real 404, never a bare "Banner wall" page at 200 (a soft 404 Google kept indexed, 2026-10-30)
|
||||
if (!a) {
|
||||
const nf = '<!doctype html><html lang="en"' + themehead.htmlAttr('dark') + '><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>No wall under that name | InstantAdPay</title><meta name="robots" content="noindex"><link rel="icon" type="image/png" href="/logo-icon.png">' + themehead.tag() + '<link rel="stylesheet" href="/assets/site.css?v=20261112q"></head><body><section><div class="wrap" style="max-width:720px;text-align:center;padding:60px 0"><h1>No wall under that name</h1><p class="muted">This member page does not exist or was removed.</p><p><a class="btn" href="/">Go to InstantAdPay</a></p></div></section></body></html>';
|
||||
const nf = '<!doctype html><html lang="en"' + themehead.htmlAttr('dark') + '><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>No wall under that name | InstantAdPay</title><meta name="robots" content="noindex"><link rel="icon" type="image/png" href="/logo-icon.png">' + themehead.tag() + '<link rel="stylesheet" href="/assets/site.css?v=20261112ln"></head><body><section><div class="wrap" style="max-width:720px;text-align:center;padding:60px 0"><h1>No wall under that name</h1><p class="muted">This member page does not exist or was removed.</p><p><a class="btn" href="/">Go to InstantAdPay</a></p></div></section></body></html>';
|
||||
res.writeHead(404, baseHeaders({ 'Content-Type': 'text/html; charset=utf-8', 'Cache-Control': 'no-cache', 'X-Robots-Tag': 'noindex' }));
|
||||
return res.end(nf);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user