Fix Live Now not showing for non-streamer (#9773)

* Fix Live Now not showing for non-streamer

* Rename for clarity

* Logged out users too
This commit is contained in:
Eric Bailey
2026-01-27 12:16:54 -06:00
committed by GitHub
parent 2953b3a094
commit fd6b8fcbf1
3 changed files with 20 additions and 6 deletions
+7 -3
View File
@@ -20,7 +20,7 @@ export function useActorStatus(actor?: bsky.profile.AnyProfileView) {
void tick // revalidate every minute
if (shadowed && 'status' in shadowed && shadowed.status) {
const isValid = validateStatus(shadowed.status, config)
const isValid = isStatusValidForViewers(shadowed.status, config)
const isDisabled = shadowed.status.isDisabled || false
const isActive = isStatusStillActive(shadowed.status.expiresAt)
if (isValid && !isDisabled && isActive) {
@@ -64,7 +64,11 @@ export function isStatusStillActive(timeStr: string | undefined) {
return isAfter(expiry, now)
}
export function validateStatus(
/**
* Validates whether the live status is valid for display in the app. Does NOT
* validate if the status is valid for the acting user e.g. as they go live.
*/
export function isStatusValidForViewers(
status: AppBskyActorDefs.StatusView,
config: LiveNowConfig,
) {
@@ -72,7 +76,7 @@ export function validateStatus(
try {
if (AppBskyEmbedExternal.isView(status.embed)) {
const url = new URL(status.embed.external.uri)
return config.allowedDomains.has(url.hostname)
return config.allSupportedDomains.has(url.hostname)
} else {
return false
}