a tool for shared writing and social publishing

fix backlink req url for looseleafs

+4 -2
+4 -2
app/lish/[did]/[publication]/[rkey]/getPostPageData.ts
··· 23 23 // Fetch constellation backlinks for mentions 24 24 const pubRecord = document.documents_in_publications[0]?.publications 25 25 ?.record as PubLeafletPublication.Record; 26 - const rkey = new AtUri(uri).rkey; 27 - const postUrl = `https://${pubRecord?.base_path}/${rkey}`; 26 + let aturi = new AtUri(uri); 27 + const postUrl = pubRecord 28 + ? `https://${pubRecord?.base_path}/${aturi.rkey}` 29 + : `https://leaflet.pub/p/${aturi.host}/${aturi.rkey}`; 28 30 const constellationBacklinks = await getConstellationBacklinks(postUrl); 29 31 30 32 // Deduplicate constellation backlinks (same post could appear in both links and embeds)