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 <noreply@anthropic.com>
This commit is contained in:
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user