From 17f80efe813e141916ca3f02029a32a6b9bc6a59 Mon Sep 17 00:00:00 2001 From: Jared Pereira Date: Mon, 26 Jan 2026 13:38:14 -0500 Subject: [PATCH] use rkey and fallback to name for pub dashboard urls --- app/lish/createPub/getPublicationURL.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/lish/createPub/getPublicationURL.ts b/app/lish/createPub/getPublicationURL.ts index da8a77b6..613bef1b 100644 --- a/app/lish/createPub/getPublicationURL.ts +++ b/app/lish/createPub/getPublicationURL.ts @@ -25,7 +25,11 @@ export function getPublicationURL(pub: PublicationInput): string { } // Fall back to checking raw record for legacy base_path - if (isLeafletPublication(pub.record) && pub.record.base_path && isProductionDomain()) { + if ( + isLeafletPublication(pub.record) && + pub.record.base_path && + isProductionDomain() + ) { return `https://${pub.record.base_path}`; } @@ -36,7 +40,7 @@ export function getBasePublicationURL(pub: PublicationInput): string { const normalized = normalizePublicationRecord(pub.record); const aturi = new AtUri(pub.uri); - // Use normalized name if available, fall back to rkey - const name = normalized?.name || aturi.rkey; + //use rkey, fallback to name + const name = aturi.rkey || normalized?.name; return `/lish/${aturi.host}/${encodeURIComponent(name || "")}`; } -- 2.51.2