Rename for clarity

This commit is contained in:
Eric Bailey
2026-01-27 13:41:45 -06:00
parent bef5ad4c18
commit 6d8effee3f
3 changed files with 8 additions and 6 deletions
+1 -1
View File
@@ -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(
+4 -2
View File
@@ -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}.`,
+3 -3
View File
@@ -89,7 +89,7 @@ const DEFAULT_LIVE_ALLOWED_DOMAINS = [
'www.bluecast.app',
]
export type LiveNowConfig = {
allowedDomains: Set<string>
currentAccountAllowedHosts: Set<string>
defaultAllowedHosts: Set<string>
allowedHostsExceptionsByDid: Map<string, Set<string>>
}
@@ -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,