From 0562579a56e916f6db8dc01ddbc4261dfc720ea2 Mon Sep 17 00:00:00 2001 From: martbost Date: Sat, 22 Aug 2026 12:09:25 -0500 Subject: [PATCH] og:url keeps the ?v= angle - Facebook was canonicalizing every variant back to the cached plain URL --- server.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index e9081d8..69ad767 100644 --- a/server.js +++ b/server.js @@ -776,14 +776,15 @@ async function handleApi(req,res,pathname){ function serveMemberPage(req,res,file,kind,id){ let html; try{ html=fs.readFileSync(file,'utf8'); }catch(e){ return staticFile(req,res,path.join(PUBLIC_DIR,'404.html'),404); } const base='https://rmcircle.team'; - const url=kind==='join'?`${base}/join/${id}`:`${base}/my/${id}`; const ANGLE_OG={ pocket:{t:'You already spent it this week.',d:'The pocket-change illusion, called out in 105 seconds. Watch.',i:'/v/og-angle-pocket.jpg'}, phone:{t:"Everybody's making money on your phone. Except you.",d:'90 seconds that flips it. Watch.',i:'/v/og-angle-phone.jpg'}, two:{t:"You know two people. That's all this takes.",d:'The #1 excuse, retired in 90 seconds. Watch.',i:'/v/og-angle-two.jpg'}, graveyard:{t:'Your side-hustle graveyard has enough tenants.',d:"This one's built different. 90 seconds. Watch.",i:'/v/og-angle-graveyard.jpg'} }; - const angle=kind==='join'?ANGLE_OG[new URL(req.url,'http://x').searchParams.get('v')]:null; + const angleKey=kind==='join'?new URL(req.url,'http://x').searchParams.get('v'):null; + const angle=angleKey?ANGLE_OG[angleKey]:null; + const url=kind==='join'?`${base}/join/${id}${angle?`?v=${angleKey}`:''}`:`${base}/my/${id}`; const title=angle?angle.t:(kind==='join' ? `You're invited to the RM Circle team by Member #${id}` : `Member #${id}'s RM Circle team — live on the blockchain`);