Integration after the three tracks: Links share kit offers the best link per channel (link-hosts), uploaded page images pass the curtain, /publishers in traffic pages and sitemap, chatbot says dayparting and health checks are live, qualifying package is $25 in tank and dashboard copy
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
'use strict';
|
||||
// Holding tank (Marty, 2026-09-11): free members who arrived with no sponsor wait
|
||||
// here, and a member who has bought their own $20+ package can adopt one:
|
||||
// here, and a member who has bought their own $25 or larger package can adopt one:
|
||||
// first come, at most two open adoptions at a time, an adoption falls back into
|
||||
// the tank after 7 days if the person never linked a wallet or bought, and a
|
||||
// person can be adopted twice at most before they stay wherever they are.
|
||||
@@ -16,7 +16,7 @@ const CAP_OPEN = 2; // open adoptions per adopter
|
||||
const TTL_MS = 7 * 86400000; // an adoption's window to convert
|
||||
const MAX_ADOPTIONS = 2; // per adoptee, lifetime (dropped adoptions count too, since 2026-09-13)
|
||||
const HOLD_MS = 3 * 24 * 3600 * 1000; // an adoption is a commitment: no releasing someone you picked up less than 3 days ago (Marty, 2026-09-13)
|
||||
const MIN_OWN_BUY_CENTS = 2000; // adopter must have bought a $20+ package themselves
|
||||
const MIN_OWN_BUY_CENTS = 2500; // adopter must have bought a qualifying ($25+) package themselves
|
||||
const WARN_DAYS = 10; // dormant lead: sponsor warned after this many days without contact
|
||||
const RESCUE_DAYS = 14; // ...and the lead moves to the tank after this many (warning at least 4 days old)
|
||||
|
||||
@@ -71,7 +71,7 @@ async function waiting() {
|
||||
.sort((a, b) => (b.lastSeen || b.joined) - (a.lastSeen || a.joined));
|
||||
}
|
||||
|
||||
// has this member bought a $20+ package themselves? (the qualifying-for-yourself buy)
|
||||
// has this member bought a $25 or larger package themselves? (the qualifying-for-yourself buy)
|
||||
function hasOwnBuy(memberId) {
|
||||
if (!memberId) return false;
|
||||
for (const ev of chain.recentEvents(200000)) if (ev.type === 'Purchase' && ev.buyerId === memberId && Number(ev.priceCents) >= MIN_OWN_BUY_CENTS) return true;
|
||||
@@ -80,8 +80,8 @@ function hasOwnBuy(memberId) {
|
||||
async function eligibility(email) {
|
||||
const a = await accounts.byEmail(email);
|
||||
if (!a) return { ok: false, reason: 'Sign in first.' };
|
||||
if (!a.memberId) return { ok: false, reason: 'Switch on payouts and buy your first $20 package to adopt from the tank.' };
|
||||
if (!hasOwnBuy(a.memberId)) return { ok: false, reason: 'Buy your own $20 or more package first. Adopting is for members who have made that move themselves.' };
|
||||
if (!a.memberId) return { ok: false, reason: 'Switch on payouts and buy your first $25 package to adopt from the tank.' };
|
||||
if (!hasOwnBuy(a.memberId)) return { ok: false, reason: 'Buy your own $25 or larger package first. Adopting is for members who have made that move themselves.' };
|
||||
const open = await impl().open(a.email);
|
||||
if (open.length >= CAP_OPEN) return { ok: false, reason: 'You have ' + CAP_OPEN + ' open adoptions. Help one of them link a wallet or buy, and a slot frees up.', full: true };
|
||||
return { ok: true, account: a, open };
|
||||
|
||||
Reference in New Issue
Block a user