From f69453648bbdd7508af439930754bb80a764a1e7 Mon Sep 17 00:00:00 2001 From: martbost Date: Fri, 30 Oct 2026 07:33:19 -0500 Subject: [PATCH] Wall profile rendering: a purchase alone decides (a quarantined account that buys a package gets its bio and links back, as the quarantine notice promises) Co-Authored-By: Claude Fable 5.1 --- server.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server.js b/server.js index 7a082de..0aa6d08 100644 --- a/server.js +++ b/server.js @@ -1662,7 +1662,7 @@ const server = http.createServer(async (req, res) => { const t = nameTok.toLowerCase(); let a = await accounts.byCode(t); if (!a) a = await accounts.byUsername(t); if (!a && /^\d+$/.test(nameTok)) a = await accounts.byMemberId(Number(nameTok)); - if (a) { name = a.username ? '@' + a.username : (a.memberId ? 'member #' + a.memberId : null); avatarUrl = a.avatarUrl || null; own = !!(acct && a.email === acct.email); var bio = null, cobrand = false; try { cobrand = (await ads.milestonesOf(a.email)).includes('level3'); if (cobrand && !a.profileQuarantined && await hasBought(a)) bio = a.bio ? String(a.bio).slice(0, 220) : null; } catch (e) {} } + if (a) { name = a.username ? '@' + a.username : (a.memberId ? 'member #' + a.memberId : null); avatarUrl = a.avatarUrl || null; own = !!(acct && a.email === acct.email); var bio = null, cobrand = false; try { cobrand = (await ads.milestonesOf(a.email)).includes('level3'); if (cobrand && await hasBought(a)) bio = a.bio ? String(a.bio).slice(0, 220) : null; } catch (e) {} } } return json(res, 200, { ref: tok, sponsorId, sponsorBlocked, sponsorRouted, tankHold: intentBuy ? null : tankHold, sponsorName: spd.name || null, invited: !!(tok || showTok), name, avatarUrl, own, bio: typeof bio === 'undefined' ? null : bio, cobrand: typeof cobrand === 'undefined' ? false : cobrand }); } @@ -3506,7 +3506,7 @@ const server = http.createServer(async (req, res) => { } const joinPath = '/join/' + (a.username || a.code); // profile fields (bio, avatar, socials, intro video) only for a paying member; a free account's wall carries the name, the line's ads and the join call (2026-10-30) - const bought = (await hasBought(a)) && !a.profileQuarantined; + const bought = await hasBought(a); // a purchase lifts the quarantine too: the notice promised the links after the first package let socials = null; if (bought) { try { socials = a.socials ? JSON.parse(a.socials) : null; } catch (e) {} } return json(res, 200, { name: a.username ? '@' + a.username : 'member #' + (a.memberId || 0), bought, avatarUrl: bought ? (a.avatarUrl || null) : null, bio: bought ? (a.bio || null) : null, socials, badge, @@ -4230,7 +4230,7 @@ const server = http.createServer(async (req, res) => { if (a) { const nm = a.username ? '@' + a.username : 'member #' + (a.memberId || 0); const esc = t => String(t || '').replace(/[&<>"]/g, c => ({ '&': '&', '<': '<', '>': '>', '"': '"' }[c])); - const bought = (await hasBought(a)) && !a.profileQuarantined; // only a paying member's avatar becomes the share image + const bought = await hasBought(a); // only a paying member's avatar becomes the share image const title = nm + '\u2019s ad wall | LinkSpin'; const desc = esc(wallDescription(nm)); // fixed site sentence, never the bio (indexed snippet stays ours) const img = bought && a.avatarUrl && /^https:/.test(a.avatarUrl) ? a.avatarUrl : SITE_URL + '/banners/linkspin-og-1200x630.png';