Holding tank: 24-hour sign-up grace plus a Who invited you card (Marty 2026-11-07: "24-hour grace plus the prompt"). On Nov 2 a sponsorless sign-up was adopted five hours after joining, before he could say who invited him.
Grace: for 24 hours from an account's created time nobody can adopt the person by hand. They stay on the waiting list after the open ones with an Opens in badge and no Adopt button, and adopt() refuses in plain words. Only sign-up counts, so someone back in the tank later has no grace. Auto-assign does not wait for it: the 24-hour hold still runs from the wallet link and is not stretched. No notice tells people to adopt someone they cannot adopt yet: the wallet-ready post waits for the grace and says the time really left, is skipped when the rotation takes them in that tick, the arrivals post moves to when the grace ends (marks.claim per member), and the Overview note and weekly email count only people who are open. Prompt: a member with no sponsor and no member number sees the card at the top of Overview, types a username, confirms in an in-page box, and that person becomes their sponsor through setSponsor as a deliberate change with by 'invited', so it follows to LinkSpin and clears the hold. Refused: self, unknown username, already sponsored, member number or wallet already on the contract, a chain loop, a suspended sponsor, a no-payout chain, and a line with nobody on the contract (they would walk up to the company). The network sponsor is tried first. Nobody invited me hides it and a small link brings it back. Not an adoption: status 'invited', no 7-day window, not counted toward the two. The named sponsor gets the referral email and an on-site notice. Switch-on-payouts reminders track the named sponsor. Chatbot canned + systemPrompt, KNOWLEDGE_DATE 2026-11-07. my.js, admin.js, admin-sponsorcheck.js ?v=20261107tg. qa/tank-hold.mjs, qa/sponsorfollow.test.cjs and qa/sponsorfollow-e2e.mjs extended (SF_E2E_PORT overrides the ports). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+10
-5
@@ -34,7 +34,7 @@ function key() {
|
||||
function enabled() { return !!key(); }
|
||||
|
||||
// ---- canned answers: instant, free, always in voice ----
|
||||
const KNOWLEDGE_DATE = '2026-11-06'; // bump whenever the canned answers / prompt are brought up to date
|
||||
const KNOWLEDGE_DATE = '2026-11-07'; // bump whenever the canned answers / prompt are brought up to date
|
||||
const SUPPORT_RE = /(contact|reach|email|e-mail|message|talk to|speak (to|with)|get hold of) (the )?(support|admin|administrator|owner|marty|staff|team at instantadpay|someone|a (human|person|real person))|support (email|address|ticket|team|desk)|help ?desk|(open|send|file|submit|raise) (a )?(support )?ticket|\b(human|real person|live (agent|person|chat|support))\b|customer (service|support)|support@|how (do|can) i get (help|support)/i;
|
||||
const CANNED = [
|
||||
// Shards of Valor bonus heroes (2026-11-05, Marty approved): sold one time. The prices and whether they are on sale live in settings, so
|
||||
@@ -173,15 +173,18 @@ const CANNED = [
|
||||
{ id: 'pif', title: 'Pay it forward (PIF)', q: ['How do I PIF someone?', 'Can I buy a package for my referral?', 'Should I fund someone from the tank?'], tags: ['pif', 'pay it forward', 'gift', 'holding tank'],
|
||||
re: /\b(pif|p\.i\.f|pay(ing)? it forward|paid it forward|gift (them|him|her|someone|a member)|send (them|him|her) (some )?pol)\b|\b(fund(ing)?|pay(ing)? for|cover(ing)?|buy(ing)?|purchas(e|ing)|front(ing)?|spot)\b[^.?!]{0,50}\b(for (them|him|her|someone|a member|a new member|my (referral|downline|member))|(their|his|her|someone'?s|a member'?s) (first )?(package|starter|activation|\$?20))\b|\b(front|spot|lend|loan|advance|stake|grubstake)\b[^.?!]{0,30}\b(them|him|her|someone|a member|a new member|my (referral|downline|member))\b/i,
|
||||
a: 'PIF is a gift you send from your own wallet, and the site never touches the money. That is different from other platforms, where the site takes money out of your account balance and buys the position for the other person: InstantAdPay has no balances, so the POL goes straight from your wallet to theirs, and they buy their package themselves, from their own wallet. It only appears on your own free referrals and on members you have adopted, and only once they have linked a wallet, so you cannot PIF somebody who is still sitting in the holding tank. The order is: adopt them from Members > My line > Holding tank, get them to link a wallet on their Wallet tab, then the PIF button shows up, you enter an amount and your own wallet app opens with their address already filled in. Now the part that matters most: do not send anything until you have actually talked to that person and they have told you they will use it. Once that POL leaves your wallet it is gone, there is no refund, no chargeback and nothing we can do to pull it back, because the money goes straight from your wallet to theirs and never touches us. The gift is theirs to keep whatever they do with it, so they can go quiet, spend it on something else, or never sign in again, and none of that is against any rule. Someone in the holding tank joined with nobody working with them and may never have engaged at all, which makes an unanswered PIF the easiest money on this site to lose. Get a reply, get a clear commitment that they are going to buy and build, see that they have linked a wallet and are actually active, and only then decide. If they do buy a $20 package the contract pays you 50 percent as their sponsor and they become one of your qualifying buyers, so a gift that works costs you about half; a gift to somebody who never answers costs you all of it. Never gift money you need, never borrow to do it, and treat every PIF as money you are content to lose.' },
|
||||
{ id: 'who-invited', title: 'Who invited you? (naming your sponsor)', q: ['How do I add the person who invited me?', 'I joined without a link, can I name my sponsor?', 'What is the Who invited you card?'], tags: ['who invited you', 'invited', 'holding tank', 'no sponsor', 'sponsor link'],
|
||||
re: /(who invited|invited (me|by)|joined without a (link|sponsor)|forgot (the|my|to use).{0,12}(link|sponsor)|(add|name|set|enter|pick|choose) (my |a )?sponsor|nobody invited)/i,
|
||||
a: 'If you joined without a sponsor link, your Overview shows a Who invited you? card. Type the username of the person who invited you, confirm it, and they become your sponsor, here and on LinkSpin, and they get a notice. Do it before you switch on payouts or buy, because your sponsor locks on the contract at that point. It has to be a real member: not you, not someone in your own line, and not someone who has not switched on payouts with nobody above them who has (ask them to switch on first). Once you have a sponsor or a member number the card goes away. Nobody invited you? Tap Nobody invited me and stay in the holding tank; a small link on the Overview brings the card back while you are still there. Nothing on the site waits for your answer. New sign-ups cannot be adopted by hand for their first 24 hours, so you have a day to tell us before a member can pick you up.' },
|
||||
{ id: 'tank-hold', title: 'Matched with a sponsor (activation on hold)', q: ['Why can I not switch on payouts?', 'It says I am being matched with a sponsor'], tags: ['holding tank', 'switch on payouts', 'matched with a sponsor', 'ready to activate'],
|
||||
re: /(being matched|matched with a sponsor|(can.?t|cannot|unable to) (i )?(switch on|turn on|activate) (my )?payouts|activate (button|payouts) (is )?(gone|missing|hidden)|ready to activate)/i,
|
||||
a: 'You joined without a sponsor, so you are in the holding tank. The contract locks your sponsor for good the first time you switch on payouts or buy, so switching on payouts on its own waits until a real member picks you up. Buying is never held: you can buy a package any time, and with no sponsor it goes through under the company position. Once your wallet is linked, members see you at the top of their holding tank with a Ready to activate badge. If nobody adopts you within 24 hours, the site assigns you to the next eligible member in turn (someone active with their own $20 package). As soon as you have a sponsor, the Switch on payouts button comes back. If you already have a sponsor on LinkSpin with the same email or wallet, you are placed under them right away.' },
|
||||
a: 'You joined without a sponsor, so you are in the holding tank. If someone invited you, type their username on the Who invited you? card on your Overview and this ends right away. The contract locks your sponsor for good the first time you switch on payouts or buy, so switching on payouts on its own waits until a real member picks you up. Buying is never held: you can buy a package any time, and with no sponsor it goes through under the company position. Once your wallet is linked, members see you at the top of their holding tank with a Ready to activate badge. If nobody adopts you within 24 hours, the site assigns you to the next eligible member in turn (someone active with their own $20 package). As soon as you have a sponsor, the Switch on payouts button comes back. If you already have a sponsor on LinkSpin with the same email or wallet, you are placed under them right away.' },
|
||||
{ id: 'tank-activate-link', title: 'Switch on payouts after you were picked up (one-tap link)', q: ['I got a Switch on payouts link from my new sponsor', 'How do I switch on payouts after I was adopted?'], tags: ['holding tank', 'switch on payouts', 'adopted', 'one tap', 'reminder'],
|
||||
re: /((switch on|turn on|activate) payouts? (link|email|reminder)|activate=1|(picked (me )?up|adopted( me)?).*(switch on|activate)|one.?tap.*(payouts|activate)|reminder.*switch on payouts)/i,
|
||||
a: 'When a member picks you up from the holding tank (or the site assigns you to one after 24 hours), the chat and the email you get both carry a Switch on payouts link: instantadpay.com/my?activate=1#wallet. Tap it, sign in if asked, and your wallet opens with your new sponsor already filled in. It is one free transaction, no package needed, and it locks that sponsor in as yours on the contract. No wallet linked yet? The same link asks you to link one first (one free signature) and then carries on. On a phone without a wallet browser, the wallet picker opens and hands you to your wallet app to confirm. Nobody, not even the site, can switch payouts on for you: it has to come from your own wallet. If you have not done it 24 hours after you were picked up you get one reminder email (and your sponsor gets a note to give you a nudge), and one last reminder at 72 hours. They stop as soon as your payouts are on or you buy a package.' },
|
||||
{ id: 'holding-tank', title: 'Holding tank and adoptions', q: ['What is the holding tank?', 'How do I adopt a member?'], tags: ['holding tank', 'adopt', 'unsponsored'],
|
||||
re: /(holding tank|adopt(ing|ion|ed)? (a |an |from|someone|member)|orphan(ed)? member|no sponsor|unsponsored|release to tank)/i,
|
||||
a: 'The holding tank is where free members who joined without a sponsor wait, and anyone can be picked up first come. To adopt you need payouts switched on and your own $20 or larger package bought; then open Members > My line > Holding tank. You can hold 2 open adoptions at a time and each one runs for 7 days, and if that person never links a wallet or buys they drop back into the tank. Adopting sets you as their sponsor, opens a chat and emails them, and their first purchase binds to you on the chain. You can also release one of your own free referrals into the tank for somebody else to work with, though not one you adopted less than 3 days ago. A member can be adopted twice in their lifetime at most, so an adoption you drop still costs them one of those chances. Members who have linked a wallet show a Ready to activate badge with the hours left and sit at the top of the list: their payouts are on hold until someone adopts them, and after 24 hours the site assigns them to the next eligible adopter in turn (own $20 package, fewer than 2 open adoptions, signed in within the last 7 days). Adopters take turns, so the one assigned least recently goes first.' },
|
||||
a: 'The holding tank is where free members who joined without a sponsor wait, and anyone can be picked up first come once they have been here 24 hours. A new sign-up shows an Opens in badge until then, with no Adopt button, so they have a day to tell us who invited them (the 24-hour safety net for wallet-linked members still runs on its own clock). To adopt you need payouts switched on and your own $20 or larger package bought; then open Members > My line > Holding tank. You can hold 2 open adoptions at a time and each one runs for 7 days, and if that person never links a wallet or buys they drop back into the tank. Adopting sets you as their sponsor, opens a chat and emails them, and their first purchase binds to you on the chain. You can also release one of your own free referrals into the tank for somebody else to work with, though not one you adopted less than 3 days ago. A member can be adopted twice in their lifetime at most, so an adoption you drop still costs them one of those chances. Members who have linked a wallet show a Ready to activate badge with the hours left and sit at the top of the list: their payouts are on hold until someone adopts them, and after 24 hours the site assigns them to the next eligible adopter in turn (own $20 package, fewer than 2 open adoptions, signed in within the last 7 days). Adopters take turns, so the one assigned least recently goes first.' },
|
||||
{ id: 'qualification', title: 'Qualification, levels 2 and 3, credits vs POL', q: ['How do I unlock level 2?', 'How does qualification work?', 'What is a pass-up?'], tags: ['qualification', 'level 2', 'level 3', 'pass-up', 'qualified start'],
|
||||
re: /(qualif|unlock level|level 2|level 3|pass.?up)/i,
|
||||
a: 'Two different things are earned here. CREDITS: every member, free ones included, earns ad credits by viewing ads, videos, visits and the daily sign-in; credits buy your own ads and are never withdrawn. POL: real crypto paid to your wallet when your referrals buy packages, once you are activated: the $20 starter package plus payouts switched on from your wallet. Level 1 pays 50 percent of the packages your direct referrals buy, from the day you are activated. Bring 2 buyers of $20 or more and level 2 unlocks; 5 unlock level 3. When a level is not qualified, its share climbs the sponsor line, checking up to 25 positions, and pays the first qualified person. Qualification never expires and cannot be bought. Qualified Start: you may link extra wallets of your own as positions under your account (Buy packages > Qualified Start); each one that buys a $20+ package counts as a qualifying buyer, its credits pool with yours, and 50% of its purchase comes back to your main wallet. Your own money, your own wallets, a faster start, never an income promise.' },
|
||||
@@ -346,7 +349,9 @@ ${passTiersFact()}${heroesFact()}${refuelFact()}${synFact()}${polminerFact()}${w
|
||||
- WALLETS + BUYING POL (Training > Wallets and buying POL, /wallets, members only): preferred MetaMask (recommended; extra accounts for Qualified Start), Phantom (PHANTOM GOTCHA: Polygon is OFF by default; Settings > Active Networks > turn on Polygon, otherwise connect/buy fails or shows the wrong network; seen with Jim Watts' EB team 2026-09-13), SafePal, Coinbase Wallet; Trust works but blocks buys spending most of its POL (keep ~2x). MoonPay flow: connect wallet, Buy packages > "Buy POL with a card" opens MoonPay with POL on Polygon + the member's address prefilled; card/Apple Pay/Google Pay; first-time ID check; minimum order ~$30; buy package cost + 2-3 POL for fees; POL arrives in minutes; then buy. Exchanges: withdraw POL on the Polygon network. Never MATIC on Ethereum, never share the recovery phrase.
|
||||
- PROHIBITED CONTENT (2026-10-30, Terms section 8, /terms#prohibited): gambling, casinos, betting, lotteries, sweepstakes; adult or sexual content; drugs and prescription pharmaceuticals; weapons; hate or harassment; malware, phishing, counterfeit goods; misleading financial promises. Refused at save time in bios, social links, line banners, wall offers and every campaign field. A bio may not contain a URL or a domain (links go in the social fields). Profile text, avatar and social links appear on the public wall ONLY for members who have bought a package; a free account's wall shows the name, the line's ads and the join button. Link-farm accounts (created to plant links in profile fields) are removed without notice with their profile text.
|
||||
- INTRO VIDEO ON THE WALL: Profile > social links has an "Intro video" field (YouTube, Vimeo or direct .mp4 link). It embeds on the member's public wall page (/wall/<username>) right under their bio, above the three-level line and the join button.
|
||||
- HOLDING TANK (Members > My line > Holding tank card): free members who joined with no sponsor wait there; a member who has switched on payouts AND bought their own $20+ package can Adopt one (first come, max 2 open adoptions, 7-day window; if the person never links a wallet or buys, they fall back into the tank; a person can be adopted twice at most). Adopting sets the sponsor, opens a chat and emails the member; their first purchase then binds to the adopter on-chain. Members can also "Release to tank" one of their own free referrals (pay it forward), but NOT someone they adopted less than 3 days ago: an adoption is a commitment, and a dropped adoption still counts toward that person's two-adoption lifetime limit. Releases are posted to the feed and Telegram like pickups. Admin sees the tank under Members.
|
||||
- HOLDING TANK (Members > My line > Holding tank card): free members who joined with no sponsor wait there; new sign-ups cannot be adopted by hand for 24 hours from sign-up (they show an Opens in badge and no Adopt button); a member who has switched on payouts AND bought their own $20+ package can Adopt one (first come, max 2 open adoptions, 7-day window; if the person never links a wallet or buys, they fall back into the tank; a person can be adopted twice at most). Adopting sets the sponsor, opens a chat and emails the member; their first purchase then binds to the adopter on-chain. Members can also "Release to tank" one of their own free referrals (pay it forward), but NOT someone they adopted less than 3 days ago: an adoption is a commitment, and a dropped adoption still counts toward that person's two-adoption lifetime limit. Releases are posted to the feed and Telegram like pickups. Admin sees the tank under Members.
|
||||
- WHO INVITED YOU (2026-11-07, Marty approved): a member with no sponsor and no member number sees a Who invited you? card on their Overview. They type a username, confirm in an in-page box, and that member becomes their sponsor (it follows to LinkSpin, lifts the activation hold, and the sponsor gets a new-referral email and notice). Refused: themselves, a username that does not exist, someone in their own line, a member who cannot take new members, a member with no payouts on and nobody above them on the contract, and anyone who already has a sponsor or a member number. Nobody invited me hides the card (a small Overview link brings it back while they are in the tank) and changes nothing else. It never blocks the site. It is not an adoption: no 7-day window and it does not count toward the two.
|
||||
- SIGN-UP GRACE (2026-11-07): for 24 hours from sign-up nobody can adopt a member by hand. The 24-hour auto-assign is unchanged and runs from the wallet link, so a member who links a wallet in their first hour is matched about 24 hours after linking, with at most a short hand-adoption window first. Members back in the tank later have no grace.
|
||||
- TANK ACTIVATION HOLD (2026-10-27, Marty: never default a tank member to the company): a tank member (no sponsor, not activated) can NOT switch on payouts on its own yet (a PURCHASE is NEVER held, Marty 2026-10-27: with no sponsor anywhere a buy goes ahead under the catch position #1); the Wallet tab and Getting started card say "You're being matched with a sponsor. Payouts switch on as soon as someone picks you up (within 24 hours)." with the time left, and the activate button is hidden. The 24-hour clock starts when they link a wallet; they then show at the top of every holding tank with a green "Ready to activate" badge and hours left, and a post goes to the team's Telegram payments topic. If nobody adopts them in 24 hours, the site auto-assigns them to the next eligible adopter in rotation (own $20+ package, fewer than 2 open adoptions, signed in within 7 days, not suspended; least recently auto-assigned first); the adopter gets a chat + email and Telegram shows the pickup marked (auto-assigned). If nobody is eligible they stay on hold and the admin is alerted; never the company. Someone whose same email or wallet already has a sponsor on LinkSpin is placed under that sponsor instead (not one they were released or rescued from). A member who arrived through a sponsor link is never held. Once they have a sponsor the hold lifts by itself. ONE-TAP SWITCH ON PAYOUTS (2026-10-27): every tank assignment (manual adoption or the 24-hour auto-assign) sends the member a chat and an email with a Switch on payouts link, https://instantadpay.com/my?activate=1#wallet; it opens the Wallet tab and starts the normal Activate payouts flow with the new sponsor prefilled (after sign-in, and after linking a wallet if none is linked yet). It never starts while the hold applies or when no sponsor resolves. The site cannot activate for anyone: activation is one free transaction from the member's own wallet. Not activated 24 hours after the assignment: one reminder email to the member with the same link and one notice to the sponsor ("@x hasn't switched on payouts yet; a nudge from you helps"); at 72 hours one last email to the member only; both stop once the member switches on payouts or buys.
|
||||
- DAILY CLAIM STREAK: finishing the daily ad set and claiming pays 5 credits on day 1, 7 on day 2, 10 from day 3, and 25 on every 7th consecutive day; miss a day and it restarts. After the set, verified visits (up to 20 a day, 1 credit each) keep earning, and the credits are meant to be spent on a campaign.
|
||||
- FOUR-MINUTE OVERVIEW VIDEO (2026-09-16): 'InstantAdPay in four minutes' is the first card on Members > Training (group 'Start here') and embedded on the home page at instantadpay.com/#overview-video (hero button 'Watch the 4-minute overview'). Send it to anyone asking what the platform is; the tab-by-tab walkthrough videos on Training go deeper. It is evergreen: no dates, no launch talk.
|
||||
@@ -380,7 +385,7 @@ ${passTiersFact()}${heroesFact()}${refuelFact()}${synFact()}${polminerFact()}${w
|
||||
- GETTING STARTED CARD (2026-09-14): the top of every new member's Overview shows four steps (username, link wallet, switch on payouts, first package) with the current one explained and one button that opens the right tab and highlights the control (Wallet tab > Link wallet; then Activate payouts). Encouragement only: it can be hidden, and members who only want to view ads and earn credits are never blocked. It disappears once all four are done.
|
||||
- LEADERBOARD + REFERRAL CONTEST (2026-09-14): instantadpay.com/leaderboard ranks members by ad packages sold to people they directly sponsor (dollar value, read from the chain; a member's own linked positions and second accounts never count). Periods: this week (Monday to Sunday, Central time), this month, all time. Weekly and monthly winners are recorded automatically at rollover, announced in Telegram, and the credit prizes set by the admin (a ladder: 1st 1,000 / 2nd 500 / 3rd 250 weekly, 5,000 / 2,500 / 1,000 monthly by default) are granted automatically to those positions; the prize text is shown on the page and on the Overview's Leaderboard card, which also shows the member's own rank. Prizes are credits or packages, never cash.
|
||||
- WHAT'S NEW / ROADMAP (2026-09-14): instantadpay.com/whats-new lists release notes (what shipped, dated, tagged new/improved/fixed) and the roadmap (planned / building, with rough ETAs). The Overview has a "What's new" card with the latest three notes and what is being built; a dot marks notes since the member's last look. Written by the admin in Admin > Releases.
|
||||
- HOLDING TANK ALERTS: when new members land in the tank, a note at the top of every member's Overview names them (usernames) and a post goes to the team's Telegram payments topic; adopt from My line > Holding tank (your own $20 package required).
|
||||
- HOLDING TANK ALERTS: 24 hours after a new member joins (when they can be adopted), a note at the top of every member's Overview names them (usernames) and a post goes to the team's Telegram payments topic; adopt from My line > Holding tank (your own $20 package required).
|
||||
- LEGACY WELCOME (former Faucet Wave / Tier One Ads members): they join through instantadpay.com/from/faucetwave or instantadpay.com/from/tieroneads and, if their email is on the legacy list, welcome-back credits are added automatically at signup (former advertisers 500, former earners 150; once per person; credits, not POL). They land in the holding tank like any member who joins without a sponsor. SOCIALPIX GATE (2026-09-20): socialpix.club no longer takes ad posts; its visitors are sent to instantadpay.com/from/socialpix (advertiser copy by default, ?seg=earn for the earner copy). No welcome-back credits for SocialPix arrivals; they join free by email and land in the holding tank.
|
||||
- PROMO CODES: partner site owners get a reusable code; a member redeems it on a join link (?promo=CODE) or in the Overview box "Have a promo code?" and receives free ad credits (amount set per code by the admin, one use per account; codes can cap uses or expire). Credits, not POL.
|
||||
- DORMANT-LEAD RESCUE: a FREE referral (no wallet, no purchase) with no message from their sponsor for 10 days triggers a warning email + dashboard flag to the sponsor ("unreached, tank in N days"); at 14 days (warning at least 4 days old) the lead moves to the holding tank and the sponsor is told. Sponsor resets the clock with a chat, a Nudge, or the "Contacted them" button (for phone/text contact). Leads whose sponsor link resolves to nobody go to the tank after a day. Nothing on-chain moves; anyone bound by a purchase never moves.
|
||||
|
||||
@@ -340,7 +340,7 @@ async function nudgeTick() {
|
||||
// weekly member email (Marty, 2026-09-14, modelled on the mailer.gold weekly): credits sitting unspent,
|
||||
// the streak, the contest standings with the member's own rank, the tank, and the line for sponsors
|
||||
let lbWeek = null; try { lbWeek = X.lb ? await X.lb().view('week') : null; } catch (e) {}
|
||||
let tankN = 0; try { tankN = X.tank ? (await X.tank.waiting()).length : 0; } catch (e) {}
|
||||
let tankN = 0; try { tankN = X.tank ? (await X.tank.adoptable()).length : 0; } catch (e) {}
|
||||
for (const acct of all) {
|
||||
if (!acct.email) continue;
|
||||
const lastD = await impl().lastDigest(acct.email);
|
||||
|
||||
+1
-1
@@ -653,6 +653,6 @@
|
||||
|
||||
<script src="/assets/common.js?v=20261101th"></script><script src="/assets/welcome.js?v=20261101th"></script>
|
||||
<script src="/assets/admin-kb.js?v=20261020kb"></script>
|
||||
<script src="/assets/admin.js?v=20261105hr"></script><script src="/assets/admin-sponsorcheck.js?v=20261022sc"></script><script src="/assets/admin-kits.js?v=20261101th"></script>
|
||||
<script src="/assets/admin.js?v=20261107tg"></script><script src="/assets/admin-sponsorcheck.js?v=20261107tg"></script><script src="/assets/admin-kits.js?v=20261101th"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
const esc = s => String(s == null ? '' : s).replace(/[&<>"']/g, c => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }[c]));
|
||||
const day = ts => ts ? new Date(Number(ts)).toLocaleString([], { year: 'numeric', month: 'short', day: 'numeric', hour: 'numeric', minute: '2-digit' }) : '';
|
||||
const say = (m, k) => { try { IAP.status(m, k); } catch (e) {} };
|
||||
const HOW = { adopt: 'adopted from the tank', rescue: 'rescued to the tank', release: 'released to the tank', expire: 'adoption window ended', admin: 'admin edit' };
|
||||
const HOW = { adopt: 'adopted from the tank', rescue: 'rescued to the tank', release: 'released to the tank', expire: 'adoption window ended', admin: 'admin edit', invited: 'the member named who invited them' };
|
||||
const NAME = { instantadpay: 'InstantAdPay', linkspin: 'LinkSpin' };
|
||||
function side(f) {
|
||||
if (!f) return '<span class="muted">no account</span>';
|
||||
|
||||
@@ -299,10 +299,10 @@
|
||||
$('tankAdmSub').textContent = r.waiting.length + ' waiting' + (nReady ? ' (' + nReady + ' ready to activate)' : '') + ' · cap ' + r.cap + ' open per adopter · ' + r.ttlDays + '-day window · ready members held ' + (r.holdHours || 24) + ' h, then auto-assigned in rotation';
|
||||
// ready = wallet linked: activation is held (never the company) until someone adopts them or the 24-hour safety net assigns them (2026-10-27)
|
||||
const left = w => { const ms = (w.holdUntil || 0) - Date.now(); if (ms <= 0) return 'assigning now'; const m = Math.round(ms / 60000); return (m >= 60 ? Math.floor(m / 60) + ' h ' + (m % 60) + ' min' : m + ' min') + ' left'; };
|
||||
const rb = w => w.ready ? ' <span class="badge" style="background:var(--ok-soft);border-color:var(--ok);color:var(--ok)">Ready to activate · ' + left(w) + '</span>' : '';
|
||||
const rb = w => (w.opensAt > Date.now() ? ' <span class="badge amber" title="New sign-up: hand adoption opens 24 hours after they joined">Opens ' + when(w.opensAt) + '</span>' : '') + (w.ready ? ' <span class="badge" style="background:var(--ok-soft);border-color:var(--ok);color:var(--ok)">Ready to activate · ' + left(w) + '</span>' : '');
|
||||
$('tankWait').innerHTML = '<tr><th>Waiting</th><th>Email</th><th>Joined</th><th>Last sign-in</th></tr>' + (r.waiting.length ? r.waiting.map(w => '<tr><td>' + esc(w.name) + rb(w) + '</td><td>' + esc(w.email) + '</td><td class="when">' + when(w.joined) + '</td><td class="when">' + (w.lastSeen ? when(w.lastSeen) : '<span class="muted">never</span>') + '</td></tr>').join('') : '<tr><td colspan="4" class="muted">empty</td></tr>')
|
||||
+ ((r.aligned || []).length ? '<tr><th colspan="4">Aligned to their network sponsor (LinkSpin) instead of the tank</th></tr>' + r.aligned.slice(0, 15).map(x => '<tr><td>' + esc(x.email) + '</td><td>' + esc(x.toName || x.to) + '</td><td class="when">' + when(x.at) + '</td><td class="muted">' + esc(x.via || '') + '</td></tr>').join('') : '');
|
||||
$('tankAdopt').innerHTML = '<tr><th>Member</th><th>Adopted by</th><th>When</th><th>Window ends</th><th>Status</th></tr>' + (r.adoptions.length ? r.adoptions.map(a => '<tr><td>' + esc(a.adopteeName) + '</td><td>' + esc(a.adopterName) + '</td><td class="when">' + when(a.ts) + '</td><td class="when">' + (a.status === 'released' ? '' : when(a.expires)) + '</td><td>' + esc(a.status) + '</td></tr>').join('') : '<tr><td colspan="5" class="muted">none yet</td></tr>');
|
||||
$('tankAdopt').innerHTML = '<tr><th>Member</th><th>Adopted by</th><th>When</th><th>Window ends</th><th>Status</th></tr>' + (r.adoptions.length ? r.adoptions.map(a => '<tr><td>' + esc(a.adopteeName) + '</td><td>' + esc(a.adopterName) + '</td><td class="when">' + when(a.ts) + '</td><td class="when">' + (a.status === 'released' || a.status === 'invited' ? '' : when(a.expires)) + '</td><td>' + esc(a.status) + '</td></tr>').join('') : '<tr><td colspan="5" class="muted">none yet</td></tr>');
|
||||
} catch (e) {}
|
||||
}
|
||||
async function loadMembers() {
|
||||
|
||||
+35
-4
@@ -39,7 +39,35 @@ function shareLink(ref) { return SHARE_DOMAIN && /^[A-Za-z0-9_]{1,40}$/.test(Str
|
||||
function tankHoldText(h) {
|
||||
let t = "You're being matched with a sponsor. Payouts switch on as soon as someone picks you up (within 24 hours).";
|
||||
if (h && h.until) { const ms = h.until - Date.now(); t += ms > 0 ? ' Time left: ' + holdLeft(ms) + '.' : ' Any minute now.'; }
|
||||
return t;
|
||||
return t + ' Did someone invite you? Tell us on your Overview.';
|
||||
}
|
||||
// "Who invited you?" card (Marty approved 2026-11-07): a member with no sponsor and no member number can name who invited
|
||||
// them. Soft: nothing else on the site waits for it, and "Nobody invited me" leaves a small link to bring it back.
|
||||
function paintInvite(me) {
|
||||
const c = $('inviteCard'), s = $('inviteSmall'); if (!c || !s) return;
|
||||
const ask = !me.memberId && me.inviteAsk;
|
||||
const small = !!(ask && ask.dismissed) && !paintInvite.reopened; // reopened from the small link: the next render must not close it under their fingers
|
||||
c.hidden = !ask || small; s.hidden = !small;
|
||||
}
|
||||
if ($('inviteGo')) {
|
||||
const say = (t, bad) => { const m = $('inviteMsg'); m.textContent = t || ''; m.style.color = bad ? 'var(--bad)' : ''; };
|
||||
const go = async () => {
|
||||
say('');
|
||||
try {
|
||||
const who = $('inviteWho').value;
|
||||
const chk = await api('/api/my/tank/invited', { who, check: true });
|
||||
if (!(await IAP.confirmBox(chk.name + ' becomes your sponsor. Your sponsor locks on the contract the first time you switch on payouts or buy, so check this is the right person.', { title: 'Who invited you?', ok: 'Yes, ' + chk.name, cancel: 'Not them' }))) return;
|
||||
const r = await api('/api/my/tank/invited', { who });
|
||||
$('inviteCard').hidden = true; IAP.status(r.name + ' is now your sponsor.', 'ok'); render();
|
||||
} catch (e) { say(e.message, true); }
|
||||
};
|
||||
$('inviteGo').addEventListener('click', go);
|
||||
$('inviteWho').addEventListener('keydown', e => { if (e.key === 'Enter') { e.preventDefault(); go(); } });
|
||||
$('inviteNo').addEventListener('click', async () => {
|
||||
try { await api('/api/my/tank/invited/dismiss', {}); } catch (e) {}
|
||||
paintInvite.reopened = false; $('inviteCard').hidden = true; $('inviteSmall').hidden = false;
|
||||
});
|
||||
$('inviteBack').addEventListener('click', e => { e.preventDefault(); paintInvite.reopened = true; $('inviteSmall').hidden = true; $('inviteCard').hidden = false; $('inviteWho').focus(); });
|
||||
}
|
||||
// one-tap switch on payouts (2026-10-27): the tank assignment chat + emails link to /my?activate=1#wallet. The intent
|
||||
// survives the sign-in and the wallet link (memory + sessionStorage) and runs the Activate button's own flow once.
|
||||
@@ -928,6 +956,7 @@ function shareLink(ref) { return SHARE_DOMAIN && /^[A-Za-z0-9_]{1,40}$/.test(Str
|
||||
if (!render.gating) { render.gating = true; showOnboard(true).then(() => { render.gating = false; render(); }); }
|
||||
return;
|
||||
}
|
||||
paintInvite(me);
|
||||
// came from a Drip Runner share link: once they have a username, straight back into the game (2026-09-30)
|
||||
if (me.returnTo === 'driprunner' && !render.toGame) { render.toGame = true; location.href = '/api/my/driprunner'; return; }
|
||||
if (me.returnTo === 'gemkingdom' && !render.toGame) { render.toGame = true; location.href = '/api/my/gemkingdom'; return; } // Gem Kingdom sent them here to sign in (2026-10-01)
|
||||
@@ -1900,14 +1929,16 @@ function shareLink(ref) { return SHARE_DOMAIN && /^[A-Za-z0-9_]{1,40}$/.test(Str
|
||||
} catch (e) {}
|
||||
}
|
||||
function renderTank(el, r) {
|
||||
const rows = listApply('tank', r.waiting).sort((a, b) => (b.ready ? 1 : 0) - (a.ready ? 1 : 0)); // ready to activate always on top (stable: the chosen order stays inside each group)
|
||||
const opens = w => w.opensAt > Date.now(); // new sign-up: they have 24 hours to say who invited them
|
||||
const opensBadge = w => ' <span class="badge amber" title="New member. They have 24 hours from sign-up to tell us who invited them. You can adopt them after that.">Opens in ' + holdLeft(w.opensAt - Date.now()) + '</span>';
|
||||
const rows = listApply('tank', r.waiting).sort((a, b) => (opens(a) ? 1 : 0) - (opens(b) ? 1 : 0) || (b.ready ? 1 : 0) - (a.ready ? 1 : 0)); // ready to activate always on top, the sign-up grace ones last (stable: the chosen order stays inside each group)
|
||||
el.innerHTML = '';
|
||||
el.appendChild(listBar('tank', r.waiting.length, rows.length, () => renderTank(el, r), { hide: ['payouts'] })); // nobody in the tank has payouts on
|
||||
const readyBadge = w => w.ready ? ' <span class="badge" style="background:var(--ok-soft);border-color:var(--ok);color:var(--ok)" title="Wallet linked. If nobody adopts them, the site assigns them to the next eligible adopter when the time runs out.">Ready to activate \u00b7 ' + (w.holdUntil > Date.now() ? holdLeft(w.holdUntil - Date.now()) + ' left' : 'assigning now') + '</span>' : '';
|
||||
el.insertAdjacentHTML('beforeend', rows.length ? rows.map(w => '<div class="lin-row"><span class="nm">' + esc(w.name) + readyBadge(w) + '</span>'
|
||||
el.insertAdjacentHTML('beforeend', rows.length ? rows.map(w => '<div class="lin-row"><span class="nm">' + esc(w.name) + (opens(w) ? opensBadge(w) : readyBadge(w)) + '</span>'
|
||||
+ '<span class="em">joined ' + ago(w.joined) + '<span class="sp wrap">' + memberChips(w) + '</span></span>'
|
||||
+ '<span class="dt">last sign-in: <b>' + ago(w.lastSeen) + '</b></span>'
|
||||
+ (r.eligible ? '<button class="btn small" type="button" data-adopt="' + esc(w.username || w.email) + '" data-aname="' + esc(w.name) + '">Adopt</button>' : '') + '</div>').join('')
|
||||
+ (r.eligible && !opens(w) ? '<button class="btn small" type="button" data-adopt="' + esc(w.username || w.email) + '" data-aname="' + esc(w.name) + '">Adopt</button>' : '') + '</div>').join('')
|
||||
: '<p class="muted small">Nobody in the tank matches those filters.</p>');
|
||||
pageList('tank', el, ':scope > .lin-row', { per: LINE_PER });
|
||||
el.querySelectorAll('[data-adopt]').forEach(b => b.addEventListener('click', async () => {
|
||||
|
||||
+13
-2
@@ -184,6 +184,17 @@
|
||||
back, and it was sitting below two promotions, one of which announces the site they
|
||||
just came from. Hidden for everyone else, so nobody else's page changes. -->
|
||||
<div class="card" id="phReturn" hidden></div>
|
||||
<div class="card" id="inviteCard" hidden>
|
||||
<div class="card-head"><h3>Who invited you?</h3></div>
|
||||
<p class="muted small" style="margin:0 0 8px">You joined without a sponsor. If someone told you about InstantAdPay, type their username and they become your sponsor. Do it before you switch on payouts or buy: your sponsor locks on the contract at that point.</p>
|
||||
<div style="display:flex;flex-wrap:wrap;gap:8px;align-items:center">
|
||||
<input id="inviteWho" autocomplete="off" autocapitalize="none" spellcheck="false" aria-label="Their username" placeholder="their username" style="flex:1 1 180px;max-width:280px">
|
||||
<button class="btn small" type="button" id="inviteGo">Set my sponsor</button>
|
||||
<button class="btn sec small" type="button" id="inviteNo">Nobody invited me</button>
|
||||
</div>
|
||||
<p class="small" id="inviteMsg" style="margin:8px 0 0"></p>
|
||||
</div>
|
||||
<p class="small muted" id="inviteSmall" hidden style="margin:0 0 10px">Remembered who invited you? <a href="#" id="inviteBack">Tell us</a></p>
|
||||
<div class="card" id="phLaunch" hidden></div>
|
||||
<div class="card" id="fdfCard" hidden></div>
|
||||
<div class="card" id="wwCard" hidden></div>
|
||||
@@ -336,7 +347,7 @@
|
||||
</div>
|
||||
<div class="card" id="tankCard" data-jump="Holding tank">
|
||||
<div class="card-head"><h3>Holding tank</h3><span class="sub" id="tankSub">members who arrived with no sponsor</span></div>
|
||||
<p class="muted small">People who joined without a sponsor wait here. Adopt one and you become their sponsor: a chat opens, they get an email with your message, and their first purchase binds to you on the contract. First come. At most <b id="tankCap">2</b> open adoptions at a time, and an adoption goes back to the tank after <b id="tankTtl">7</b> days if they have not linked a wallet or bought.</p>
|
||||
<p class="muted small">People who joined without a sponsor wait here. New sign-ups open for adoption 24 hours after they join, so they have time to tell us who invited them. Adopt one and you become their sponsor: a chat opens, they get an email with your message, and their first purchase binds to you on the contract. First come. At most <b id="tankCap">2</b> open adoptions at a time, and an adoption goes back to the tank after <b id="tankTtl">7</b> days if they have not linked a wallet or bought.</p>
|
||||
<div class="small" style="border:1px solid var(--line-strong);border-radius:10px;padding:10px 12px;margin:8px 0 0"><b>How pay it forward works here.</b> It is not what other platforms mean by it. Elsewhere, the site takes money from your account balance and buys the position for the other person. InstantAdPay has no balances and never holds funds, so a PIF here is a gift between two wallets:<br>1. You tap <b>PIF</b> next to a member who has linked a wallet.<br>2. Your own wallet app opens with their address filled in, and you send POL from your wallet straight to theirs, in good faith.<br>3. The site records the transaction and tells them, with the Polygonscan proof. They then buy their package themselves, from their own wallet, and that purchase binds to you as their sponsor on the contract.<br>Nothing obliges them to buy. InstantAdPay cannot reverse, refund or recover the POL, because it never passes through us. Talk to the person first, and only send what you are willing to give.</div>
|
||||
<p class="small" id="tankWhy" hidden></p>
|
||||
<div id="tankMine"></div>
|
||||
@@ -1263,7 +1274,7 @@
|
||||
<script src="/assets/wallet.js?v=20260911a"></script>
|
||||
<script src="/assets/promo.js?v=20261103gp"></script>
|
||||
<script src="/assets/support.js?v=20261101th"></script>
|
||||
<script src="/assets/my.js?v=20261105hr"></script>
|
||||
<script src="/assets/my.js?v=20261107tg"></script>
|
||||
<script src="/assets/fuel.js?v=20261025ff"></script>
|
||||
<script src="/assets/engine-room.js?v=20261101th"></script>
|
||||
<script src="/assets/chat.js?v=20261016n"></script>
|
||||
|
||||
@@ -17,7 +17,7 @@ const LS_SITE = process.env.LS_SITE || path.join(IAP_SITE, '..', '..', 'linkspin
|
||||
const SECRET = 'qa-sponsorfollow-' + 'x'.repeat(40);
|
||||
process.env.LS_SYNC_SECRET = SECRET;
|
||||
const SF = require(path.join(IAP_SITE, 'sponsorfollow.js'));
|
||||
const IAP_PORT = 8811, LS_PORT = 8812, IAP = 'http://127.0.0.1:' + IAP_PORT, LS = 'http://127.0.0.1:' + LS_PORT;
|
||||
const IAP_PORT = Number(process.env.SF_E2E_PORT || 8811), LS_PORT = IAP_PORT + 1, IAP = 'http://127.0.0.1:' + IAP_PORT, LS = 'http://127.0.0.1:' + LS_PORT;
|
||||
const sleep = ms => new Promise(r => setTimeout(r, ms));
|
||||
let pass = 0, fail = 0; const lines = [];
|
||||
const ok = (cond, name, extra) => { if (cond) { pass++; lines.push('ok ' + name); } else { fail++; lines.push('FAIL ' + name + (extra ? '\n ' + extra : '')); } };
|
||||
@@ -30,7 +30,7 @@ function seed(dir, list) {
|
||||
for (const a of list) { db.byEmail[a.email] = a; db.byCode[a.code] = a.email; }
|
||||
fs.writeFileSync(path.join(dir, 'accounts.json'), JSON.stringify(db));
|
||||
}
|
||||
const base = () => [acct('adopter@qa.test', 'adopter', { memberId: 0 }), acct('old@qa.test', 'oldsponsor'), acct('lead1@qa.test', 'leadone'), acct('lead2@qa.test', 'leadtwo', { sponsorRef: 'oldsponsor' }), acct('lead4@qa.test', 'leadfour', { sponsorRef: 'oldsponsor' })];
|
||||
const base = () => [acct('boss@qa.test', 'qaboss', { memberId: 77 }), acct('lead5@qa.test', 'leadfive'), acct('adopter@qa.test', 'adopter', { memberId: 0 }), acct('old@qa.test', 'oldsponsor'), acct('lead1@qa.test', 'leadone'), acct('lead2@qa.test', 'leadtwo', { sponsorRef: 'oldsponsor' }), acct('lead4@qa.test', 'leadfour', { sponsorRef: 'oldsponsor' })];
|
||||
const iapDir = fs.mkdtempSync(path.join(os.tmpdir(), 'sf-e2e-iap-')), lsDir = fs.mkdtempSync(path.join(os.tmpdir(), 'sf-e2e-ls-'));
|
||||
// lead3 is bound on InstantAdPay (memberId), lead4 joined LinkSpin under someone else (ordinary, already different)
|
||||
seed(iapDir, base().concat([acct('lead3@qa.test', 'leadthree', { memberId: 42, sponsorRef: 'oldsponsor' })]));
|
||||
@@ -70,6 +70,17 @@ try {
|
||||
await sleep(6000);
|
||||
ok((await facts(IAP, 'lead3@qa.test')).sponsorEmail === 'old@qa.test', 'bound on InstantAdPay: sponsor there unchanged');
|
||||
|
||||
// 3b. Who invited you (2026-11-07): the member, signed in on InstantAdPay, names their sponsor; LinkSpin follows through the real sync
|
||||
{ const st = await fetch(IAP + '/api/auth/email/start', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ email: 'lead5@qa.test', fts: Date.now() - 8000 }) }).then(x => x.json());
|
||||
const v = await fetch(IAP + '/api/auth/email/verify', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ email: 'lead5@qa.test', code: st.devCode }) });
|
||||
const cookie = (v.headers.getSetCookie ? v.headers.getSetCookie() : []).map(c => c.split(';')[0]).join('; ');
|
||||
const inv = await fetch(IAP + '/api/my/tank/invited', { method: 'POST', headers: { 'Content-Type': 'application/json', Cookie: cookie }, body: JSON.stringify({ who: '@qaboss' }) }).then(x => x.json());
|
||||
ok(inv.ok && inv.name === '@qaboss', 'lead5 names @qaboss on InstantAdPay', JSON.stringify({ inv, dev: !!st.devCode }));
|
||||
ok(await waitFor(async () => (await facts(LS, 'lead5@qa.test')).sponsorEmail === 'boss@qa.test'), 'LinkSpin follows: lead5 under boss');
|
||||
const f5 = await facts(LS, 'lead5@qa.test'); ok(f5 && f5.prov && f5.prov.by === 'invited' && f5.prov.origin === 'instantadpay', 'LinkSpin keeps the record (by invited, origin instantadpay)', JSON.stringify(f5 && f5.prov));
|
||||
const a5 = await admin(IAP, '/api/admin/tank'); ok((a5.adoptions || []).some(x => x.adoptee === 'lead5@qa.test' && x.status === 'invited'), 'InstantAdPay admin tank shows the record');
|
||||
}
|
||||
|
||||
// 4. ping-pong: let both ticks run; nothing keeps bouncing
|
||||
const s1 = await admin(IAP, '/api/admin/lssync'), t1 = await admin(LS, '/api/admin/iapsync');
|
||||
await admin(IAP, '/api/admin/lssync/run', {}); await admin(LS, '/api/admin/iapsync/run', {}); await sleep(1500);
|
||||
|
||||
@@ -173,6 +173,31 @@ async function network() {
|
||||
assert.strictEqual(P.chats.length, 1); assert.strictEqual(Q.chats.length, 0, 'no chat on the quiet side');
|
||||
const qr = await Q.tank.adopt('other@x.co', 'lead'); assert.ok(qr.error, 'cannot be adopted twice across the network');
|
||||
});
|
||||
await t('Who invited you: the member names a sponsor on one platform, the other follows and agrees (2026-11-07)', async () => {
|
||||
const P = platform('instantadpay', 'linkspin'), Q = platform('linkspin', 'instantadpay'); people(P, Q);
|
||||
const r = await P.tank.nameSponsor('lead@x.co', 'adopter'); assert.ok(r.ok, JSON.stringify(r));
|
||||
assert.strictEqual(P.store.get('lead@x.co').by, 'invited');
|
||||
const s = await settle(P, Q, ['lead@x.co', 'adopter@x.co']);
|
||||
assert.strictEqual(s.moves, 1); assert.strictEqual(await spOf(Q, 'lead@x.co'), 'adopter@x.co');
|
||||
assert.ok(!(await Q.tank.waiting()).some(w => w.email === 'lead@x.co'), 'gone from the other waiting list');
|
||||
assert.strictEqual(Q.store.get('lead@x.co').by, 'invited'); assert.strictEqual(Q.store.get('lead@x.co').origin, 'instantadpay');
|
||||
assert.ok((await Q.tank.adopt('other@x.co', 'lead')).error, 'nobody adopts them on the other side');
|
||||
assert.ok((await Q.tank.nameSponsor('lead@x.co', 'otheradopter')).error, 'the other side refuses a second name');
|
||||
});
|
||||
await t('Who invited you: a bound member on the other platform keeps that sponsor; reported, not moved', async () => {
|
||||
const P = platform('instantadpay', 'linkspin'), Q = platform('linkspin', 'instantadpay'); people(P, Q);
|
||||
Q.bound.add('lead@x.co');
|
||||
const r = await P.tank.nameSponsor('lead@x.co', 'adopter'); assert.ok(r.ok, JSON.stringify(r));
|
||||
const { d } = await deliver(P, Q, 'lead@x.co');
|
||||
assert.strictEqual(d.action, 'bound'); assert.strictEqual(await spOf(Q, 'lead@x.co'), null);
|
||||
});
|
||||
await t('sign-up grace holds on both platforms', async () => {
|
||||
const P = platform('instantadpay', 'linkspin'), Q = platform('linkspin', 'instantadpay'); people(P, Q);
|
||||
for (const X of [P, Q]) X.accounts.add('fresh@x.co', { username: 'fresh', created: Date.now() });
|
||||
for (const X of [P, Q]) assert.ok(/less than 24 hours/.test((await X.tank.adopt('adopter@x.co', 'fresh')).error || ''), X.name);
|
||||
assert.strictEqual(await spOf(P, 'fresh@x.co'), null); assert.strictEqual(await spOf(Q, 'fresh@x.co'), null);
|
||||
});
|
||||
|
||||
await t('ping-pong guard: the applied change comes back as "same" and settles in one round trip', async () => {
|
||||
const P = platform('instantadpay', 'linkspin'), Q = platform('linkspin', 'instantadpay'); people(P, Q);
|
||||
await P.tank.adopt('adopter@x.co', 'lead');
|
||||
|
||||
@@ -24,6 +24,7 @@ delete process.env.DATABASE_URL; // JSON stores only
|
||||
let fails = 0; const ok = (cond, label, extra) => { console.log((cond ? 'PASS ' : 'FAIL ') + label + (extra ? ' ' + extra : '')); if (!cond) fails++; };
|
||||
const sleep = ms => new Promise(r => setTimeout(r, ms));
|
||||
const H = 3600000;
|
||||
const addr = () => '0x' + crypto.randomBytes(20).toString('hex');
|
||||
|
||||
// ---------------- Part A ----------------
|
||||
function fakeAccounts() {
|
||||
@@ -222,12 +223,156 @@ async function partA() {
|
||||
}
|
||||
|
||||
// ---------------- Part B ----------------
|
||||
// ---------------- Sign-up grace + "Who invited you?" (Marty approved 2026-11-07) ----------------
|
||||
async function partGrace() {
|
||||
console.log('-- Sign-up grace + Who invited you: tank.js with a mocked clock');
|
||||
const M = 60000;
|
||||
{ // hand adoption: blocked for 24 hours from created, open after, old members untouched
|
||||
const B = bench(); const { tank, accounts, env } = B; const t0 = env.now;
|
||||
B.buyer('ad@x.co', 11);
|
||||
accounts.add('new@x.co', { created: t0 - H }); accounts.add('old@x.co');
|
||||
const w = await tank.waiting(); const row = w.find(x => x.email === 'new@x.co');
|
||||
ok(row && row.opensAt === t0 + 23 * H, 'waiting(): new sign-up carries opensAt = created + 24 h', JSON.stringify(row));
|
||||
ok(w.find(x => x.email === 'old@x.co').opensAt === 0, 'waiting(): an old account is open now');
|
||||
ok(w[w.length - 1].email === 'new@x.co', 'waiting(): grace members sort after the open ones');
|
||||
ok((await tank.adoptable()).every(x => x.email !== 'new@x.co'), 'adoptable() leaves out grace members (Overview note, weekly email)');
|
||||
const r = await tank.adopt('ad@x.co', 'new', 'hi');
|
||||
ok(r.error && /less than 24 hours/.test(r.error) && /23 h 0 min/.test(r.error), 'grace blocks a hand adoption with a plain message', JSON.stringify(r));
|
||||
ok(!(await accounts.byEmail('new@x.co')).sponsorRef, '...and writes no sponsor');
|
||||
ok(!B.mails.length && !B.chats.length, '...and tells nobody');
|
||||
env.now = t0 + 23 * H - M;
|
||||
ok((await tank.adopt('ad@x.co', 'new', 'hi')).error, 'still blocked one minute before it opens');
|
||||
env.now = t0 + 23 * H + M;
|
||||
const r2 = await tank.adopt('ad@x.co', 'new', 'hi');
|
||||
ok(r2.ok, 'opens after 24 hours', JSON.stringify(r2));
|
||||
const r3 = await tank.adopt('ad@x.co', 'old', 'hi');
|
||||
ok(r3.ok, 'an old account is adoptable at once (back in the tank later = no grace)', JSON.stringify(r3));
|
||||
}
|
||||
{ // wallet in the first hour: hand adoption opens at 24 h, the safety net keeps its own clock
|
||||
const B = bench(); const { tank, accounts, env } = B; const t0 = env.now;
|
||||
B.buyer('ad@x.co', 11); B.buyer('ad2@x.co', 12);
|
||||
accounts.add('w@x.co', { created: t0 });
|
||||
env.now = t0 + H; accounts._by.get('w@x.co').address = addr(); accounts._by.get('w@x.co').lastSeen = env.now;
|
||||
const t1 = await tank.readyTick();
|
||||
ok(t1.fresh.length === 0, 'wallet in the first hour: no "adopt them" notice during the grace', JSON.stringify(t1.fresh));
|
||||
const h = await tank.holdFor(await accounts.byEmail('w@x.co'));
|
||||
ok(h.hold.since === t0 + H && h.hold.until === t0 + 25 * H, 'the hold clock runs from the wallet link, not stretched by the grace', JSON.stringify(h.hold));
|
||||
env.now = t0 + 23 * H; ok((await tank.readyTick()).fresh.length === 0, 'still no notice at 23 hours');
|
||||
ok((await tank.adopt('ad@x.co', 'w', 'hi')).error, 'hand adoption refused at 23 hours');
|
||||
env.now = t0 + 24 * H + M; for (const em of ['ad@x.co', 'ad2@x.co']) accounts._by.get(em).lastSeen = env.now;
|
||||
const t2 = await tank.readyTick();
|
||||
ok(t2.fresh.length === 1 && t2.fresh[0].until === t0 + 25 * H && !t2.assigned.length, 'grace over: notice once, with the real end of the hold', JSON.stringify(t2.fresh));
|
||||
ok(tank.leftText(t2.fresh[0].until - env.now) === '59 min', 'the notice text can say the time really left', tank.leftText(t2.fresh[0].until - env.now));
|
||||
ok((await tank.readyTick()).fresh.length === 0, '...and not twice');
|
||||
env.now = t0 + 25 * H - 10 * M;
|
||||
const t3 = await tank.readyTick();
|
||||
ok(t3.assigned.length === 1 && t3.assigned[0].adoptee === 'w@x.co', 'the rotation takes them inside 24 hours of the wallet link', JSON.stringify(t3.assigned));
|
||||
}
|
||||
{ // wallet in the first minutes: the rotation fires just before the grace ends, no notice ever goes out
|
||||
const B = bench(); const { tank, accounts, env } = B; const t0 = env.now;
|
||||
B.buyer('ad@x.co', 11);
|
||||
accounts.add('fast@x.co', { created: t0, address: addr() });
|
||||
env.now = t0 + 5 * M; ok((await tank.readyTick()).fresh.length === 0, 'wallet in minute 5: no notice');
|
||||
env.now = t0 + 24 * H - 5 * M; accounts._by.get('ad@x.co').lastSeen = env.now;
|
||||
const t = await tank.readyTick();
|
||||
ok(t.assigned.length === 1 && t.fresh.length === 0, 'auto path unaffected: assigned inside the grace (24 h from the wallet link), no adopt notice', JSON.stringify({ a: t.assigned, f: t.fresh }));
|
||||
ok((await accounts.byEmail('fast@x.co')).sponsorRef === 'ad', 'the safety net wrote the sponsor');
|
||||
}
|
||||
{ // grace ends in the last tick of the hold: the safety net takes them, nobody is told to adopt someone already gone
|
||||
const B = bench(); const { tank, accounts, env } = B; const t0 = env.now;
|
||||
B.buyer('ad@x.co', 11);
|
||||
accounts.add('mid@x.co', { created: t0 });
|
||||
env.now = t0 + 10 * M; accounts._by.get('mid@x.co').address = addr(); await tank.readyTick();
|
||||
env.now = t0 + 24 * H + M; accounts._by.get('ad@x.co').lastSeen = env.now; // 9 minutes of hold left: inside the last tick
|
||||
const t = await tank.readyTick();
|
||||
ok(t.assigned.length === 1 && t.fresh.length === 0, 'no notice for someone the rotation takes in the same tick', JSON.stringify({ a: t.assigned, f: t.fresh }));
|
||||
}
|
||||
{ // the arrivals post: announced when the grace ends
|
||||
const B = bench(); const { tank, env } = B; const t0 = env.now;
|
||||
const list = [{ email: 'a', joined: t0 - 24 * H - 5 * M }, { email: 'b', joined: t0 - 24 * H - 20 * M }, { email: 'c', joined: t0 - H }];
|
||||
ok(tank.openedSince(list, t0 - 15 * M).map(x => x.email).join() === 'a', 'openedSince: only people whose grace ended since the last check');
|
||||
}
|
||||
{ // Who invited you: every refusal, nothing written
|
||||
const B = bench(); const { tank, accounts, env } = B; const t0 = env.now;
|
||||
B.buyer('boss@x.co', 21);
|
||||
accounts.add('m@x.co', { username: 'mm1', created: t0 });
|
||||
accounts.add('kid@x.co', { username: 'kid', sponsorRef: 'mm1' }); // joined under m: a loop
|
||||
accounts.add('free@x.co', { username: 'free' }); // no payouts, nobody above them
|
||||
accounts.add('under@x.co', { username: 'under', sponsorRef: 'boss' }); // no payouts, but boss above them
|
||||
accounts.add('has@x.co', { username: 'hassp', sponsorRef: 'boss' });
|
||||
accounts.add('bound@x.co', { username: 'bound1', memberId: 55 });
|
||||
const say = async (e, who) => { const r = await tank.nameSponsor(e, who); return r.error || ''; };
|
||||
ok(/Type the username/.test(await say('m@x.co', ' ')), 'refused: empty');
|
||||
ok(/That is you/.test(await say('m@x.co', '@MM1')), 'refused: self (any case, leading @)');
|
||||
ok(/No member here/.test(await say('m@x.co', 'nosuchname')), 'refused: unknown username');
|
||||
ok(/No member here/.test(await say('m@x.co', 'bad name!')), 'refused: not a username');
|
||||
ok(/already have a sponsor/.test(await say('has@x.co', 'boss')), 'refused: already sponsored');
|
||||
ok(/locked on the contract/.test(await say('bound@x.co', 'boss')), 'refused: member id');
|
||||
ok(/in your own line/.test(await say('m@x.co', 'kid')), 'refused: chain loop (inDownlineOf)');
|
||||
ok(/nobody above them/.test(await say('m@x.co', 'free')), 'refused: nobody on the contract in that line (would fall to the company)');
|
||||
B.blocked.add(21);
|
||||
ok(/cannot take new members/.test(await say('m@x.co', 'boss')), 'refused: no-payout chain');
|
||||
B.blocked.delete(21);
|
||||
ok(!(await accounts.byEmail('m@x.co')).sponsorRef && !B.mails.length, 'no refusal wrote a sponsor or sent a notice');
|
||||
const c = await tank.nameSponsor('m@x.co', 'boss', { check: true });
|
||||
ok(c.ok && c.name === '@boss' && !(await accounts.byEmail('m@x.co')).sponsorRef && !B.mails.length, 'check mode validates and writes nothing', JSON.stringify(c));
|
||||
ok((await tank.nameSponsor('m@x.co', 'under', { check: true })).ok, 'a sponsor with no payouts but someone above them on the contract is allowed');
|
||||
B.net['m2@x.co'] = { sponsorEmail: 'boss@x.co', via: 'email' };
|
||||
accounts.add('m2@x.co', { username: 'mm2' });
|
||||
const al = await tank.nameSponsor('m2@x.co', 'under');
|
||||
ok(al.error && al.aligned && (await accounts.byEmail('m2@x.co')).sponsorRef === 'boss', 'the sponsor the network already knows comes first', JSON.stringify(al));
|
||||
}
|
||||
{ // Who invited you: success
|
||||
const B = bench(); const { tank, accounts, env } = B; const t0 = env.now;
|
||||
B.buyer('boss@x.co', 21); B.buyer('ad@x.co', 22);
|
||||
accounts.add('m@x.co', { username: 'mm1', created: t0 });
|
||||
const m0 = await accounts.byEmail('m@x.co');
|
||||
ok(tank.inviteAsk(m0) && tank.inviteAsk(m0).dismissed === false, 'inviteAsk: the card shows for a tank member');
|
||||
ok(tank.inviteAsk(await accounts.byEmail('boss@x.co')) === null, 'inviteAsk: no card for a member with a sponsor line / member id');
|
||||
tank.dismissInvite('m@x.co');
|
||||
ok(tank.inviteAsk(m0).dismissed === true, 'Nobody invited me: card dismissed');
|
||||
ok(!(await accounts.byEmail('m@x.co')).sponsorRef && (await tank.waiting()).some(w => w.email === 'm@x.co'), '...nothing else changes: still in the tank');
|
||||
const r = await tank.nameSponsor('m@x.co', '@Boss');
|
||||
ok(r.ok && r.name === '@boss', 'prompt success', JSON.stringify(r));
|
||||
const a = await accounts.byEmail('m@x.co');
|
||||
ok(a.sponsorRef === 'boss', 'sponsor written');
|
||||
ok((await tank.holdFor(a)) === null && tank.inviteAsk(a) === null, 'hold gone, card gone');
|
||||
ok(!(await tank.waiting()).some(w => w.email === 'm@x.co'), 'out of the waiting list');
|
||||
ok(B.mails.length === 1 && B.mails[0].to === 'boss@x.co' && /new referral/.test(B.mails[0].subject), 'the named sponsor gets the notice, nobody else', JSON.stringify(B.mails.map(x => x.to)));
|
||||
ok(!B.chats.length, 'no chat written in the sponsor\'s name');
|
||||
const v = await tank.adminView(); const rec = v.adoptions.find(x => x.adoptee === 'm@x.co');
|
||||
ok(rec && rec.status === 'invited' && rec.adopter === 'boss@x.co', 'admin record: status invited');
|
||||
ok((await tank.summaryFor('m@x.co')) === null, 'not an adoption: nothing counts toward the two, nothing open on the other site');
|
||||
const again = await tank.nameSponsor('m@x.co', 'ad');
|
||||
ok(/already have a sponsor/.test(again.error || '') && (await accounts.byEmail('m@x.co')).sponsorRef === 'boss', 'a second name is refused');
|
||||
env.now = t0 + 8 * 86400000; await tank.sweep();
|
||||
ok((await accounts.byEmail('m@x.co')).sponsorRef === 'boss', 'no 7-day window: still theirs after a week');
|
||||
}
|
||||
{ // a ready member names someone: the hold record clears the way an adoption does, no auto-assign
|
||||
const B = bench(); const { tank, accounts, env } = B; const t0 = env.now;
|
||||
B.buyer('boss@x.co', 21); B.buyer('ad@x.co', 22);
|
||||
accounts.add('r@x.co', { username: 'rr1', created: t0, address: addr() });
|
||||
await tank.readyTick();
|
||||
ok(tank.readyRec('r@x.co'), 'setup: on the 24-hour clock');
|
||||
const r = await tank.nameSponsor('r@x.co', 'boss');
|
||||
ok(r.ok && !tank.readyRec('r@x.co'), 'the hold record clears', JSON.stringify(r));
|
||||
env.now = t0 + 24 * H;
|
||||
for (const em of ['boss@x.co', 'ad@x.co']) accounts._by.get(em).lastSeen = env.now;
|
||||
ok(!(await tank.readyTick()).assigned.length && (await accounts.byEmail('r@x.co')).sponsorRef === 'boss', 'the rotation leaves them alone');
|
||||
ok(tank.payView().some(p => p.email === 'r@x.co' && p.adopter === 'boss@x.co'), 'the switch-on-payouts reminders track the named sponsor');
|
||||
const B2 = bench(); B2.buyer('boss@x.co', 21); const w = '0x' + 'e'.repeat(40); B2.accounts.add('c@x.co', { username: 'cc1', address: w }); B2.onChain.add(w);
|
||||
ok(/locked on the contract/.test((await B2.tank.nameSponsor('c@x.co', 'boss')).error || ''), 'refused: wallet already on the contract, member number not saved yet');
|
||||
}
|
||||
}
|
||||
|
||||
async function partB() {
|
||||
console.log('-- Part B: local copy');
|
||||
const PORT = Number(process.env.TANKHOLD_PORT || 8799);
|
||||
const BASE = 'http://127.0.0.1:' + PORT; const ADMIN = 'localtest';
|
||||
const DATA = fs.mkdtempSync(path.join(os.tmpdir(), 'iap-tankhold-srv-')); fs.mkdirSync(path.join(DATA, 'uploads'));
|
||||
const LSSECRET = crypto.randomBytes(24).toString('hex'); // throwaway
|
||||
{ const a = { email: 'qa-sponsor@example.com', pass: null, sponsorRef: '', code: 'cqasp1', username: 'qasponsor', address: null, created: Date.now() - 30 * 86400000, lastSeen: Date.now() - H, memberId: 42 }; // a member with a contract position, for the Who invited you checks
|
||||
fs.writeFileSync(path.join(DATA, 'accounts.json'), JSON.stringify({ v: 2, byEmail: { [a.email]: a }, byAddress: {}, byCode: { [a.code]: a.email }, joins: 0, positions: {} })); }
|
||||
const srv = spawn(process.execPath, ['server.js'], { cwd: SITE, stdio: ['ignore', 'pipe', 'pipe'],
|
||||
env: Object.assign({}, process.env, { PORT: String(PORT), DATA_DIR: DATA, NODE_ENV: 'development', ADMIN_EMAIL: 'qa-admin@example.com', ADMIN_PASSWORD: ADMIN, LS_SYNC_SECRET: LSSECRET, LS_URL: 'http://127.0.0.1:1' }) });
|
||||
let log = ''; srv.stdout.on('data', d => log += d); srv.stderr.on('data', d => log += d);
|
||||
@@ -354,6 +499,44 @@ async function partB() {
|
||||
ok(s5.act.length === 0 && s5.note === 'Step 1: link your wallet (one free signature). Then switching on payouts with member #21 starts by itself.', 'no wallet yet: asks to link first, nothing starts', JSON.stringify(s5));
|
||||
await c.close(); }
|
||||
ok(!errs.length, 'no page errors (one-tap link pages)', errs.join(' | ').slice(0, 200));
|
||||
{ // 6. Who invited you + the sign-up grace, on the real page (2026-11-07)
|
||||
const nc = await signIn('qa-new@example.com', 'qanewone', null, '10.78.0.9');
|
||||
const m0 = (await api('/api/me', null, { Cookie: nc })).j;
|
||||
ok(m0 && m0.inviteAsk && m0.inviteAsk.dismissed === false, '/api/me: inviteAsk for a tank member', JSON.stringify(m0 && m0.inviteAsk));
|
||||
const sc = await signIn('qa-sponsor@example.com', null, null, '10.78.0.10');
|
||||
const tv = (await api('/api/my/tank', null, { Cookie: sc })).j; const row6 = tv && tv.waiting.find(w => w.email === 'qa-new@example.com');
|
||||
ok(row6 && row6.opensAt > Date.now(), '/api/my/tank: a new sign-up is listed with opensAt', JSON.stringify(row6));
|
||||
const bad = await api('/api/my/tank/invited', { who: 'nosuchname' }, { Cookie: nc });
|
||||
ok(bad.status === 400 && /No member here/.test(bad.j.error), 'POST invited: unknown username refused', JSON.stringify(bad));
|
||||
const self = await api('/api/my/tank/invited', { who: 'qanewone' }, { Cookie: nc });
|
||||
ok(self.status === 400 && /That is you/.test(self.j.error), 'POST invited: self refused', JSON.stringify(self));
|
||||
const anon = await api('/api/my/tank/invited', { who: 'qasponsor' });
|
||||
ok(anon.status === 401, 'POST invited: signed out refused');
|
||||
const { c, pg } = await actCtx(nc); await pg.goto(BASE + '/my#overview', { waitUntil: 'load' }); await pg.waitForTimeout(3500);
|
||||
const vis = id => pg.evaluate(i => { const e = document.getElementById(i); return !!(e && !e.hidden); }, id);
|
||||
ok(await vis('inviteCard'), 'Overview: Who invited you card shows');
|
||||
await pg.screenshot({ path: path.join(SITE, 'qa/out/tank-invite-card.png') }).catch(() => {});
|
||||
await pg.fill('#inviteWho', 'nosuchname'); await pg.click('#inviteGo'); await pg.waitForTimeout(700);
|
||||
ok(/No member here/.test(await pg.textContent('#inviteMsg')), 'card: the refusal shows in the card', await pg.textContent('#inviteMsg'));
|
||||
await pg.click('#inviteNo'); await pg.waitForTimeout(500);
|
||||
ok(!(await vis('inviteCard')) && await vis('inviteSmall'), 'card: Nobody invited me hides it, the small link stays');
|
||||
await pg.reload({ waitUntil: 'load' }); await pg.waitForTimeout(3000);
|
||||
ok(!(await vis('inviteCard')) && await vis('inviteSmall'), 'card: stays dismissed after a reload');
|
||||
await pg.click('#inviteBack'); await pg.fill('#inviteWho', '@qasponsor'); await pg.click('#inviteGo'); await pg.waitForSelector('#dlgCancel', { timeout: 8000 }).catch(async e => { throw new Error('no confirm box; card says: ' + await pg.textContent('#inviteMsg') + ' | ' + e.message.slice(0, 80)); });
|
||||
await pg.click('#dlgCancel'); await pg.waitForTimeout(500);
|
||||
ok(!(await api('/api/me', null, { Cookie: nc })).j.sponsorName, 'card: Not them writes nothing');
|
||||
await pg.click('#inviteGo'); await pg.waitForSelector('#dlgOk', { timeout: 5000 }); await pg.click('#dlgOk'); await pg.waitForTimeout(2500);
|
||||
const m1 = (await api('/api/me', null, { Cookie: nc })).j;
|
||||
ok(m1 && m1.sponsorName === '@qasponsor' && !m1.inviteAsk, 'card: yes sets the sponsor, the card is gone', JSON.stringify({ n: m1 && m1.sponsorName, a: m1 && m1.inviteAsk }));
|
||||
ok(!(await vis('inviteCard')) && !(await vis('inviteSmall')), 'card: nothing left on the Overview');
|
||||
const adm6 = (await api('/api/admin/tank', null, adminH)).j;
|
||||
ok(adm6.adoptions.some(a => a.adoptee === 'qa-new@example.com' && a.status === 'invited'), 'admin tank: the invited record shows');
|
||||
await c.close();
|
||||
const pc2 = await signIn('qa-kid2@example.com', 'qakidtwo', 'iap.sponsor=qasponsor', '10.78.0.11');
|
||||
const m2 = (await api('/api/me', null, { Cookie: pc2 })).j;
|
||||
ok(m2 && !m2.inviteAsk, 'a member who joined through a link never sees the card');
|
||||
ok(!errs.length, 'no page errors (Who invited you)', errs.join(' | ').slice(0, 200));
|
||||
}
|
||||
} finally {
|
||||
if (browser) await browser.close().catch(() => {});
|
||||
try { srv.kill(); } catch (e) {}
|
||||
@@ -363,6 +546,7 @@ async function partB() {
|
||||
}
|
||||
|
||||
await partA();
|
||||
await partGrace();
|
||||
if (process.argv[2] !== 'unit') await partB();
|
||||
console.log(fails ? '\n' + fails + ' FAILED' : '\nall passed');
|
||||
process.exit(fails ? 1 : 0);
|
||||
|
||||
@@ -1512,7 +1512,11 @@ async function tankNotifyTick() {
|
||||
const f = path.join(DATA_DIR, 'tank-notify.json');
|
||||
let st = { last: 0 }; try { st = JSON.parse(fs.readFileSync(f, 'utf8')); } catch (e) {}
|
||||
const since = st.last || (Date.now() - 24 * 3600 * 1000);
|
||||
const fresh = (await tank.waiting()).filter(w => (w.joined || 0) > since);
|
||||
// sign-up grace (2026-11-07): announced when they can be adopted, 24 hours after sign-up, not when they arrive. graceFrom =
|
||||
// the first run of this rule: anyone who joined before it was already announced at sign-up.
|
||||
const graceFrom = st.graceFrom || (st.graceFrom = st.last || Date.now());
|
||||
const fresh = [];
|
||||
for (const w of tank.openedSince(await tank.waiting(), since)) if ((w.joined || 0) > graceFrom && await marks.claim('tankopen:' + w.email + ':' + (w.joined || 0))) fresh.push(w);
|
||||
st.last = Date.now(); fs.writeFileSync(f, JSON.stringify(st));
|
||||
if (!fresh.length) return;
|
||||
const named = fresh.filter(w => w.username).map(w => '@' + w.username);
|
||||
@@ -1555,11 +1559,11 @@ async function tankReadyTick() {
|
||||
// linked" with the last sign-in, so adopters can judge (Marty 2026-10-29: the old wording read as a live member)
|
||||
const seen = ms => { try { return new Date(ms).toLocaleDateString('en-US', { month: 'short', day: 'numeric', timeZone: 'America/Chicago' }); } catch (e) { return ''; } };
|
||||
for (const w of r.fresh) await telegramSend(sc.telegramEchoChatId, '\u{1F7E2} ' + (w.username ? '@' + clean(w.username) : 'A new member')
|
||||
+ (w.linkedNow ? ' linked a wallet and is ready to switch on payouts. Adopt them from the holding tank in the next 24 hours: '
|
||||
: ' is in the holding tank with a wallet already linked' + (w.lastSeen ? ' (last seen ' + seen(w.lastSeen) + ')' : '') + '. Adopt them in the next 24 hours: ') + link, sc.telegramEchoTopicId).catch(() => {});
|
||||
+ (w.linkedNow ? ' linked a wallet and is ready to switch on payouts. Adopt them from the holding tank in the next ' + tank.leftText(w.until - Date.now()) + ': '
|
||||
: ' is in the holding tank with a wallet already linked' + (w.lastSeen ? ' (last seen ' + seen(w.lastSeen) + ')' : '') + '. Adopt them in the next ' + tank.leftText(w.until - Date.now()) + ': ') + link, sc.telegramEchoTopicId).catch(() => {});
|
||||
} else { // first run after deploy (the members already linked) or a busy quarter hour: one digest, not a wall of posts
|
||||
const named = r.fresh.filter(w => w.username).map(w => '@' + clean(w.username));
|
||||
await telegramSend(sc.telegramEchoChatId, '\u{1F7E2} ' + r.fresh.length + ' members in the holding tank have a wallet linked and are ready to switch on payouts' + (named.length ? ': ' + named.slice(0, 12).join(', ') + (named.length > 12 ? ' and ' + (named.length - 12) + ' more' : '') : '') + '. Adopt them from the holding tank in the next 24 hours: ' + link, sc.telegramEchoTopicId).catch(() => {});
|
||||
await telegramSend(sc.telegramEchoChatId, '\u{1F7E2} ' + r.fresh.length + ' members in the holding tank have a wallet linked and are ready to switch on payouts' + (named.length ? ': ' + named.slice(0, 12).join(', ') + (named.length > 12 ? ' and ' + (named.length - 12) + ' more' : '') : '') + '. Adopt them from the holding tank in the next ' + tank.leftText(Math.min(...r.fresh.map(w => w.until)) - Date.now()) + ': ' + link, sc.telegramEchoTopicId).catch(() => {});
|
||||
}
|
||||
return r;
|
||||
}
|
||||
@@ -2934,6 +2938,7 @@ const server = http.createServer(async (req, res) => {
|
||||
const out = { signedIn: true, gkShop: !!parseCookies(req)['iap.gkshop'], sdShop: !!parseCookies(req)['iap.sdshop'], pwMint: !!parseCookies(req)['iap.pwmint'], returnTo: ['turkeydrop', 'polhunter', 'driprunner', 'passivedrip', 'gemkingdom', 'gkshop', 'spookydoors', 'sdshop', 'pwmint', 'polybreak', 'polminer', 'warpwares', 'shardsofvalor'].includes(parseCookies(req)['iap.return']) ? parseCookies(req)['iap.return'] : null, sponsorBlocked, sponsorRouted, sponsorName: spdMe.name || null, email: s.email || (acct && acct.email) || null,
|
||||
address: s.address || (acct && acct.address) || null, memberId,
|
||||
username: (acct && acct.username) || null, theme: (acct && acct.theme) || null,
|
||||
inviteAsk: !memberId && acct ? tank.inviteAsk(acct) : null, // the Who invited you card (2026-11-07)
|
||||
refCode: (acct && acct.code) || null, sponsorId, tankHold, sponsorFallback,
|
||||
// profile + line-banner fields so the Profile pane repopulates on reload (were being saved but not returned)
|
||||
avatarUrl: (acct && acct.avatarUrl) || null, bio: (acct && acct.bio) || null,
|
||||
@@ -2964,7 +2969,7 @@ const server = http.createServer(async (req, res) => {
|
||||
let tankWaiting = null; // top of every Overview: people waiting for a sponsor (Marty, 2026-09-12)
|
||||
try {
|
||||
if (!tankWaitCache || Date.now() - tankWaitCache.ts > 60000) tankWaitCache = { ts: Date.now(), list: await tank.waiting() };
|
||||
const tw = tankWaitCache.list;
|
||||
const tw = tank.adoptableOf(tankWaitCache.list); // only people who can be adopted right now (sign-up grace, 2026-11-07)
|
||||
tankWaiting = { count: tw.length, names: tw.slice(0, 6).map(w => w.name), eligible: !!(await tank.eligibility(s.email)).ok, ready: tw.filter(w => w.ready).length };
|
||||
} catch (e) {}
|
||||
const sc0 = siteConfig();
|
||||
@@ -3457,6 +3462,19 @@ const server = http.createServer(async (req, res) => {
|
||||
}
|
||||
return json(res, r.error ? 400 : 200, r);
|
||||
}
|
||||
// "Who invited you?" (Marty approved 2026-11-07): the signed-in member names their own sponsor. check: validate only.
|
||||
if (p === '/api/my/tank/invited' && req.method === 'POST') {
|
||||
const s = await auth.fromRequest(req);
|
||||
if (!s || !s.email) return json(res, 401, { error: 'Sign in first.' });
|
||||
const b = await readBody(req);
|
||||
const r = await tank.nameSponsor(s.email, b.who, { check: !!b.check });
|
||||
return json(res, r.error ? 400 : 200, r);
|
||||
}
|
||||
if (p === '/api/my/tank/invited/dismiss' && req.method === 'POST') { // "Nobody invited me": hides the card, nothing else changes
|
||||
const s = await auth.fromRequest(req);
|
||||
if (!s || !s.email) return json(res, 401, { error: 'Sign in first.' });
|
||||
return json(res, 200, tank.dismissInvite(s.email));
|
||||
}
|
||||
if (p === '/api/my/tank/release' && req.method === 'POST') {
|
||||
const s = await auth.fromRequest(req);
|
||||
if (!s || !s.email) return json(res, 401, { error: 'Sign in first.' });
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ const fs = require('fs');
|
||||
const path = require('path');
|
||||
const crypto = require('crypto');
|
||||
|
||||
const DELIBERATE = ['adopt', 'rescue', 'release', 'expire', 'admin'];
|
||||
const DELIBERATE = ['adopt', 'rescue', 'release', 'expire', 'admin', 'invited']; // invited = the member named who invited them (tank.js nameSponsor, 2026-11-07)
|
||||
const WINDOW_MS = 15 * 60 * 1000;
|
||||
const PROTO = 2; // wire version: 2 = rows may carry sponsorSet* + tank, peers answer { proto: 2 }
|
||||
const n = v => String(v == null ? '' : v).trim().toLowerCase();
|
||||
|
||||
@@ -16,11 +16,15 @@ 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)
|
||||
// statuses that do not count toward a person's two adoptions: a release record, and the later side of a network race
|
||||
// (both sites adopted the same person within minutes; the earlier adoption won on both, sponsorfollow.js)
|
||||
const NOT_COUNTED = ['released', 'conflict'];
|
||||
// (both sites adopted the same person within minutes; the earlier adoption won on both, sponsorfollow.js), and a record of a
|
||||
// member naming who invited them (nobody adopted them; nameSponsor below)
|
||||
const NOT_COUNTED = ['released', 'conflict', 'invited'];
|
||||
const MIN_OWN_BUY_CENTS = 2000; // adopter must have bought a $20+ 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)
|
||||
const GRACE_MS = 24 * 3600 * 1000; // nobody adopts a new sign-up by hand for this long after `created`, so they can say who invited them (Marty 2026-11-07)
|
||||
const BRAND = 'InstantAdPay';
|
||||
const LINE_URL = () => siteUrl + '/my#line';
|
||||
|
||||
let DATA_DIR = '.', accounts, chain, messages, mailer, siteUrl = 'https://instantadpay.com';
|
||||
|
||||
@@ -48,10 +52,10 @@ const D = {
|
||||
const rows = adopter ? await db.q("SELECT * FROM adoptions WHERE status='open' AND adopter=?", [adopter]) : await db.q("SELECT * FROM adoptions WHERE status='open'");
|
||||
return rows.map(rowA);
|
||||
},
|
||||
async countFor(adoptee) { const r = await db.q("SELECT COUNT(*) n FROM adoptions WHERE adoptee=? AND status NOT IN ('released','conflict')", [adoptee]); return Number(r[0].n); },
|
||||
async countFor(adoptee) { const r = await db.q("SELECT COUNT(*) n FROM adoptions WHERE adoptee=? AND status NOT IN ('released','conflict','invited')", [adoptee]); return Number(r[0].n); },
|
||||
async setStatus(id, status) { await db.q('UPDATE adoptions SET status=?, closed=? WHERE id=?', [status, Date.now(), Number(id)]); },
|
||||
async recent(n) { return (await db.q('SELECT * FROM adoptions ORDER BY id DESC LIMIT ?', [Number(n) || 100])).map(rowA); },
|
||||
async hasRecord(adoptee) { const r = await db.q("SELECT COUNT(*) n FROM adoptions WHERE adoptee=? AND status NOT IN ('released','conflict')", [adoptee]); return Number(r[0].n) > 0; },
|
||||
async hasRecord(adoptee) { const r = await db.q("SELECT COUNT(*) n FROM adoptions WHERE adoptee=? AND status NOT IN ('released','conflict','invited')", [adoptee]); return Number(r[0].n) > 0; },
|
||||
async all() { return (await db.q('SELECT * FROM adoptions ORDER BY id')).map(rowA); },
|
||||
async mark(lead) { const r = await db.q('SELECT * FROM lead_marks WHERE `lead`=?', [lead]); return r[0] ? { sponsor: r[0].sponsor, contacted: Number(r[0].contacted_ts || 0), warned: Number(r[0].warned_ts || 0) } : null; },
|
||||
async setMark(lead, f) {
|
||||
@@ -88,9 +92,10 @@ async function waiting() {
|
||||
wallet: !!a.address, activated: !!a.memberId, // in the tank "activated" is always false (payouts on = out of the tank); wallet can still be linked
|
||||
earned: (tot[a.email] || {}).earned || 0, balance: (tot[a.email] || {}).balance || 0,
|
||||
// wallet linked = ready to switch on payouts, held for an adopter (24-hour clock, autoAssign after that)
|
||||
opensAt: inGrace(a) ? graceEnd(a) : 0, // new sign-up: nobody can adopt them by hand before this (0 = open now)
|
||||
...(() => { const r = a.address ? readyRec(a.email) : null; return r ? { ready: true, readyAt: r.readyAt, holdUntil: r.readyAt + READY_MS } : { ready: false }; })() }))
|
||||
// ready members first (least time left first), then newest sign-in
|
||||
.sort((a, b) => (b.ready ? 1 : 0) - (a.ready ? 1 : 0) || (a.ready && b.ready ? a.readyAt - b.readyAt : 0) || (b.lastSeen || b.joined) - (a.lastSeen || a.joined));
|
||||
// open before the sign-up grace ones, ready members first (least time left first), then newest sign-in
|
||||
.sort((a, b) => (a.opensAt ? 1 : 0) - (b.opensAt ? 1 : 0) || (b.ready ? 1 : 0) - (a.ready ? 1 : 0) || (a.ready && b.ready ? a.readyAt - b.readyAt : 0) || (b.lastSeen || b.joined) - (a.lastSeen || a.joined));
|
||||
}
|
||||
|
||||
// has this member bought a $20+ package themselves? (the qualifying-for-yourself buy)
|
||||
@@ -117,7 +122,7 @@ async function view(email) {
|
||||
const a = await accounts.byEmail(ad.adoptee);
|
||||
mine.push({ id: ad.id, name: a ? nameOf(a) : mask(ad.adoptee), email: ad.adoptee, ts: ad.ts, expires: ad.expires, lastSeen: a ? (a.lastSeen || 0) : 0, wallet: !!(a && a.address), address: (a && a.address) || null, bought: !!(a && a.memberId) });
|
||||
}
|
||||
return { eligible: el.ok, reason: el.ok ? '' : el.reason, cap: CAP_OPEN, ttlDays: TTL_MS / 86400000, holdHours: READY_MS / 3600000, waiting: await waiting(), mine };
|
||||
return { eligible: el.ok, reason: el.ok ? '' : el.reason, cap: CAP_OPEN, ttlDays: TTL_MS / 86400000, holdHours: READY_MS / 3600000, graceHours: GRACE_MS / 3600000, waiting: await waiting(), mine };
|
||||
}
|
||||
|
||||
async function adopt(adopterEmail, who, note, opts) {
|
||||
@@ -131,6 +136,7 @@ async function adopt(adopterEmail, who, note, opts) {
|
||||
const target = list.find(w => (w.username && w.username.toLowerCase() === key) || w.email === key);
|
||||
if (!target) return { error: 'That member is no longer in the tank.' };
|
||||
if (target.email === e) return { error: 'That is you.' };
|
||||
if (!auto && target.opensAt > clock()) return { error: 'That member joined less than 24 hours ago, so they still have time to tell us who invited them. You can adopt them in ' + leftText(target.opensAt - clock()) + '.' }; // the safety net is not held by this: it keeps its 24-hour clock from the wallet link
|
||||
if (remoteOpen(target.email)) return { error: 'That member was just picked up on ' + OTHER + ', so they are no longer in the tank.' };
|
||||
if (!auto && await countAll(target.email) >= MAX_ADOPTIONS) return { error: 'That member has been adopted twice already and stays where they are.' }; // the safety net never leaves anyone to the company
|
||||
const token = me.username || me.code || String(me.memberId);
|
||||
@@ -477,7 +483,9 @@ async function readyTick() {
|
||||
// linkedNow: the member was on the site when they became ready, so they linked the wallet just now; otherwise the
|
||||
// wallet predates this tank visit (e.g. a dormant member returned by a sponsor; Marty 2026-10-29: the notice read as a
|
||||
// fresh link) and the notice says so, with their last sign-in
|
||||
if (rec && !rec.notified) { rec.notified = clock(); fresh.push({ email: a.email, name: nameOf(a), username: a.username || null, until: rec.readyAt + READY_MS, lastSeen: a.lastSeen || 0, linkedNow: (a.lastSeen || 0) >= rec.readyAt - 15 * 60 * 1000 }); }
|
||||
// Sign-up grace (2026-11-07): no "adopt them" post for someone who cannot be adopted yet; announced when the grace ends,
|
||||
// and not at all when the safety net takes them in this same tick (nothing left for anyone to do)
|
||||
if (rec && !rec.notified && !inGrace(a)) { rec.notified = clock(); if (clock() < rec.readyAt + READY_MS - TICK_MS) fresh.push({ email: a.email, name: nameOf(a), username: a.username || null, until: rec.readyAt + READY_MS, lastSeen: a.lastSeen || 0, linkedNow: (a.lastSeen || 0) >= rec.readyAt - 15 * 60 * 1000 }); }
|
||||
}
|
||||
RS.save();
|
||||
const auto = await autoAssign();
|
||||
@@ -548,6 +556,85 @@ async function payTick() {
|
||||
function payView() { return Object.entries(RS.load().pay || {}).map(([email, r]) => Object.assign({ email }, r)).sort((x, y) => y.at - x.at).slice(0, 100); }
|
||||
function alignedRecent(n) { return RS.load().aligned.slice(-(n || 50)).reverse(); }
|
||||
|
||||
// ── sign-up grace + "Who invited you?" (Marty approved 2026-11-07: "24-hour grace plus the prompt") ──
|
||||
// Nov 2: @santoridaviss signed up with no referral at 10:35 PM, was adoptable at 2:24 AM and adopted at 3:36 AM, before he
|
||||
// could say who invited him. So:
|
||||
// GRACE: for 24 hours from the account's `created`, nobody can adopt the person BY HAND. They stay on the waiting list with
|
||||
// opensAt set (the card shows "Opens in ...", no Adopt button). The dates are each site's own account dates. Only sign-up
|
||||
// counts: someone back in the tank later (released, rescued, window ended) is past it.
|
||||
// The safety net does not wait for the grace (opts.auto skips it): Marty's rule is a wallet-linked member is held for no
|
||||
// longer than 24 hours, so autoAssign keeps its clock from the wallet link. Wallet linked in the first 15 minutes: the
|
||||
// rotation can fire up to 15 minutes before the grace ends, and hand adoption never opens for them. Wallet linked in the
|
||||
// first hour: hand adoption opens at 24 hours and the rotation takes them about an hour after that.
|
||||
// Notices: readyTick announces a ready member only once they can be adopted, and only when time is left (adoptableOf and
|
||||
// openedSince keep the Overview note, the arrivals post and the weekly email to people who are open too).
|
||||
// PROMPT: a tank member can name who invited them. nameSponsor() goes through setSponsor like adopt(), so it follows to the
|
||||
// other site and clears the hold the same way, but it is the member's own choice: only ever for the signed-in member,
|
||||
// never an open adoption (no 7-day window, no fall-back, no count toward the two), recorded as status 'invited'.
|
||||
function graceEnd(a) { return (Number(a && a.created) || 0) + GRACE_MS; }
|
||||
function inGrace(a) { return graceEnd(a) > clock(); }
|
||||
function leftText(ms) { const m = Math.max(1, Math.ceil(Number(ms) / 60000) || 1); const h = Math.floor(m / 60); return h ? h + ' h ' + (m % 60) + ' min' : m + ' min'; }
|
||||
const adoptableOf = list => (list || []).filter(w => !(w.opensAt > clock()));
|
||||
async function adoptable() { return adoptableOf(await waiting()); }
|
||||
// people whose grace ended after `since` (the arrivals post: announced when they can be adopted, not when they sign up)
|
||||
function openedSince(list, since) { const now = clock(); return (list || []).filter(w => { const t = (Number(w.joined) || 0) + GRACE_MS; return t > since && t <= now; }); }
|
||||
// what the dashboard needs: null = no card. dismissed = they tapped "Nobody invited me" (a small link brings the card back).
|
||||
function inviteAsk(a) {
|
||||
if (!a || !inTank(a) || remoteOpen(a.email)) return null;
|
||||
return { dismissed: !!(RS.load().noInvite || {})[String(a.email || '').toLowerCase()] };
|
||||
}
|
||||
function dismissInvite(email) { const st = RS.load(); st.noInvite = st.noInvite || {}; st.noInvite[String(email || '').toLowerCase()] = clock(); RS.save(); return { ok: true }; }
|
||||
// someone in the named person's line (them first) already has a contract position? Otherwise the member would be walked up to
|
||||
// the company at their first activation, the one thing the tank exists to stop
|
||||
async function firstOnContract(sp) {
|
||||
let cur = sp; const seen = new Set();
|
||||
for (let i = 0; cur && i < 60; i++) { if (Number(cur.memberId) > 0) return cur; if (seen.has(cur.email)) return null; seen.add(cur.email); cur = await accounts.sponsorOf(cur.email); }
|
||||
return null;
|
||||
}
|
||||
// opts.check: every refusal, nothing written (the card asks "is this them?" before the real call)
|
||||
async function nameSponsor(email, who, opts) {
|
||||
const e = String(email || '').toLowerCase(); const check = !!(opts && opts.check);
|
||||
const LOCKED = 'Your payouts are already on, so your sponsor is locked on the contract.';
|
||||
let a = await accounts.byEmail(e);
|
||||
if (!a) return { error: 'Sign in first.' };
|
||||
if (Number(a.memberId) > 0) return { error: LOCKED };
|
||||
if (a.sponsorRef) return { error: 'You already have a sponsor.' };
|
||||
if (a.address) { // wallet on the contract already, member number not saved yet
|
||||
if (hooks.bound) { const id = await Promise.resolve(hooks.bound(a)).catch(() => -1); if (id < 0) return { error: 'Could not check the contract just now. Try again in a minute.' }; if (id > 0) return { error: LOCKED }; }
|
||||
else if (hooks.activated && await Promise.resolve(hooks.activated(a)).catch(() => false)) return { error: LOCKED };
|
||||
}
|
||||
if (remoteOpen(e)) return { error: 'You were just picked up on ' + OTHER + ', so you already have a sponsor.' };
|
||||
const al = await alignToNetwork(a).catch(() => null); // one identity: the sponsor the network already knows comes first
|
||||
if (al) return { error: 'You already have a sponsor on the network: ' + al.toName + '.', aligned: true };
|
||||
const key = String(who || '').trim().toLowerCase().replace(/^@+/, '');
|
||||
if (!key) return { error: 'Type the username of the person who invited you.' };
|
||||
const sp = /^[a-z0-9_]{3,20}$/.test(key) ? await accounts.byUsername(key) : null;
|
||||
if (!sp || (accounts.isUnclaimedShell && accounts.isUnclaimedShell(sp))) return { error: 'No member here has the username ' + key + '. Check the spelling with the person who invited you.' };
|
||||
if (String(sp.email).toLowerCase() === e) return { error: 'That is you. Type the username of the person who invited you.' };
|
||||
const bar = hooks.excluded || hooks.isSuspended;
|
||||
if (bar && bar(sp.email)) return { error: nameOf(sp) + ' cannot take new members right now.' };
|
||||
if (await inDownlineOf(e, sp)) return { error: nameOf(sp) + ' is in your own line, so they cannot be your sponsor.' };
|
||||
const payee = await firstOnContract(sp);
|
||||
if (!payee) return { error: nameOf(sp) + ' has not switched on payouts yet, and nobody above them has either, so you cannot go under them yet. Ask them to switch on payouts, then come back here.' };
|
||||
if (hooks.payoutBlocked && await Promise.resolve(hooks.payoutBlocked(Number(payee.memberId))).catch(() => true)) return { error: nameOf(sp) + ' cannot take new members right now.' };
|
||||
if (check) return { ok: true, check: true, name: nameOf(sp) };
|
||||
a = await accounts.byEmail(e);
|
||||
if (!a || !inTank(a)) return { error: 'You already have a sponsor.' };
|
||||
const token = sp.username || sp.code || String(sp.memberId);
|
||||
const r = await setSponsor(e, token, 'invited', 'named by the member on the Who invited you card');
|
||||
if (r && r.error) return r;
|
||||
const now = clock();
|
||||
const ad = await impl().add({ adoptee: e, adopter: String(sp.email).toLowerCase(), ts: now, expires: now, status: 'invited', note: 'named by the member on the Who invited you card' });
|
||||
{ const rr = RS.load().ready[e]; if (rr && !rr.done) { rr.done = now; rr.namedSponsor = sp.email; RS.save(); } } // the hold lifts: their sponsor resolves now
|
||||
const name = nameOf(a);
|
||||
payTrack(e, sp.email, ad.id, false); // the same switch-on-payouts reminders as an adoption (payTick)
|
||||
const subject = 'You have a new referral on ' + BRAND;
|
||||
const text = name + ' joined ' + BRAND + ' without a sponsor link and told us you invited them, so they are on your team from today. Say hello and help them with their first steps: ' + LINE_URL();
|
||||
if (mailer && mailer.hasKey()) { try { await mailer.send(sp.email, subject, text + '\n\n' + BRAND); } catch (err) {} }
|
||||
if (hooks.notify) { try { await hooks.notify(sp.email, subject, text); } catch (err) {} }
|
||||
return { ok: true, name: nameOf(sp), sponsorEmail: sp.email, member: name };
|
||||
}
|
||||
|
||||
async function adminView() {
|
||||
const recent = await impl().recent(200);
|
||||
const names = {};
|
||||
@@ -555,4 +642,4 @@ async function adminView() {
|
||||
return { waiting: await waiting(), adoptions: recent.map(ad => Object.assign({}, ad, { adopteeName: names[ad.adoptee], adopterName: names[ad.adopter] })), cap: CAP_OPEN, ttlDays: TTL_MS / 86400000, holdHours: READY_MS / 3600000, aligned: alignedRecent(30), payReminders: payView() };
|
||||
}
|
||||
|
||||
module.exports = { init, view, adopt, holdFor, markReady, readyRec, readyTick, autoAssign, payTick, payView, activateLink, PAY_R1_MS, PAY_R2_MS, alignToNetwork, alignedRecent, setClock, eligibility, READY_MS, release, sweep, rescueSweep, rescueInfo, markContacted, adminView, waiting, hasOwnBuy, recordGift, onFollow, summaryMap, summaryFor, historyMap, CAP_OPEN, TTL_MS, WARN_DAYS, RESCUE_DAYS, MAX_ADOPTIONS };
|
||||
module.exports = { init, view, adopt, holdFor, markReady, readyRec, readyTick, autoAssign, payTick, payView, activateLink, PAY_R1_MS, PAY_R2_MS, alignToNetwork, alignedRecent, setClock, eligibility, READY_MS, release, sweep, rescueSweep, rescueInfo, markContacted, adminView, waiting, adoptable, adoptableOf, openedSince, leftText, inviteAsk, dismissInvite, nameSponsor, GRACE_MS, hasOwnBuy, recordGift, onFollow, summaryMap, summaryFor, historyMap, CAP_OPEN, TTL_MS, WARN_DAYS, RESCUE_DAYS, MAX_ADOPTIONS };
|
||||
|
||||
Reference in New Issue
Block a user