Something went wrong. Try again.
Bluesky app fork with some witchin' additions 💫 forked from jollywhoppers.com/witchsky.app
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829import {AtUri} from '@atproto/api'
import {BSKY_FEED_OWNER_DIDS} from '#/lib/constants'import {type UsePreferencesQueryResponse} from '#/state/queries/preferences'import {IS_WEB} from '#/env'
let debugTopics = ''if (IS_WEB && typeof window !== 'undefined') { const params = new URLSearchParams(window.location.search) debugTopics = params.get('debug_topics') ?? ''}
export function createBskyTopicsHeader(userInterests?: string) { return { 'X-Bsky-Topics': debugTopics || userInterests || '', }}
export function aggregateUserInterests( preferences?: UsePreferencesQueryResponse,) { return preferences?.interests?.tags?.join(',') || ''}
export function isBlueskyOwnedFeed(feedUri: string) { const uri = new AtUri(feedUri) return BSKY_FEED_OWNER_DIDS.includes(uri.host)}