From 6d8effee3fe3e39262c9ad19947da86fa3b28f50 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Tue, 27 Jan 2026 13:41:45 -0600 Subject: [PATCH] Rename for clarity --- src/components/live/GoLiveDialog.tsx | 2 +- src/components/live/queries.ts | 6 ++++-- src/state/service-config.tsx | 6 +++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/components/live/GoLiveDialog.tsx b/src/components/live/GoLiveDialog.tsx index 72627e0248..ac51e87527 100644 --- a/src/components/live/GoLiveDialog.tsx +++ b/src/components/live/GoLiveDialog.tsx @@ -55,7 +55,7 @@ function DialogInner({profile}: {profile: bsky.profile.AnyProfileView}) { const tick = useTickEveryMinute() const liveNowConfig = useLiveNowConfig() const {formatted: allowedServices} = getLiveServiceNames( - liveNowConfig.allowedDomains, + liveNowConfig.currentAccountAllowedHosts, ) const time = useCallback( diff --git a/src/components/live/queries.ts b/src/components/live/queries.ts index 21a5e9048e..3c2534872c 100644 --- a/src/components/live/queries.ts +++ b/src/components/live/queries.ts @@ -31,8 +31,10 @@ export function useLiveLinkMetaQuery(url: string | null) { queryFn: async () => { if (!url) return undefined const urlp = new URL(url) - if (!liveNowConfig.allowedDomains.has(urlp.hostname)) { - const {formatted} = getLiveServiceNames(liveNowConfig.allowedDomains) + if (!liveNowConfig.currentAccountAllowedHosts.has(urlp.hostname)) { + const {formatted} = getLiveServiceNames( + liveNowConfig.currentAccountAllowedHosts, + ) throw new Error( _( msg`This service is not supported while the Live feature is in beta. Allowed services: ${formatted}.`, diff --git a/src/state/service-config.tsx b/src/state/service-config.tsx index 8cbfb37d25..bc2fc43503 100644 --- a/src/state/service-config.tsx +++ b/src/state/service-config.tsx @@ -89,7 +89,7 @@ const DEFAULT_LIVE_ALLOWED_DOMAINS = [ 'www.bluecast.app', ] export type LiveNowConfig = { - allowedDomains: Set + currentAccountAllowedHosts: Set defaultAllowedHosts: Set allowedHostsExceptionsByDid: Map> } @@ -107,13 +107,13 @@ export function useLiveNowConfig(): LiveNowConfig { } if (!currentAccount?.did || !canGoLive) return { - allowedDomains: new Set(), + currentAccountAllowedHosts: new Set(), defaultAllowedHosts, allowedHostsExceptionsByDid, } const vip = ctx.find(live => live.did === currentAccount.did) return { - allowedDomains: new Set( + currentAccountAllowedHosts: new Set( DEFAULT_LIVE_ALLOWED_DOMAINS.concat(vip ? vip.domains : []), ), defaultAllowedHosts,