From 156ea94cb1b2b6ba92350904a88b4aad2a4ac6e8 Mon Sep 17 00:00:00 2001 From: Eli Mallon Date: Tue, 13 Oct 2026 14:11:22 -0700 Subject: [PATCH] golive: ignore canonicalURLs from old handles --- .../components/live-dashboard/livestream-panel.tsx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/js/app/components/live-dashboard/livestream-panel.tsx b/js/app/components/live-dashboard/livestream-panel.tsx index 89bd8d9e1..96016e664 100644 --- a/js/app/components/live-dashboard/livestream-panel.tsx +++ b/js/app/components/live-dashboard/livestream-panel.tsx @@ -63,6 +63,14 @@ const { flex, p, px, py, gap, layout, bg, borders, text, r, w, typography } = const isWeb = Platform.OS === "web"; +function isSameNodeUrl(candidate: string, nodeUrl: string): boolean { + try { + return new URL(candidate).origin === new URL(nodeUrl).origin; + } catch { + return false; + } +} + export const LANG_TAG_PREFIX = "lang:"; export const LANGUAGES = [ @@ -368,7 +376,7 @@ function LivestreamPanel({ scrollable = true }: { scrollable?: boolean }) { if ( livestream.record.canonicalUrl && - livestream.record.canonicalUrl !== defaultCanonicalUrl + !isSameNodeUrl(livestream.record.canonicalUrl, url) ) { setCanonicalUrl(livestream.record.canonicalUrl); } @@ -384,7 +392,7 @@ function LivestreamPanel({ scrollable = true }: { scrollable?: boolean }) { setCreatePost(typeof livestream.record.post !== "undefined"); } - }, [livestream, defaultCanonicalUrl]); + }, [livestream, url]); const handleModeChange = useCallback( (newMode: "create" | "metadata" | "moderation") => { @@ -791,6 +799,7 @@ function LivestreamPanel({ scrollable = true }: { scrollable?: boolean }) { onChange={(value) => setCanonicalUrl(value)} placeholder={defaultCanonicalUrl} variant="filled" + testID="live-canonical-url" inputStyle={[ p[3], r.md, -- 2.54.0