Bluesky app fork with some witchin' additions 馃挮 witchsky.app
bluesky fork client
at main 28 lines 802 B view raw
1import {AtUri} from '@atproto/api' 2 3import {BSKY_FEED_OWNER_DIDS} from '#/lib/constants' 4import {type UsePreferencesQueryResponse} from '#/state/queries/preferences' 5import {IS_WEB} from '#/env' 6 7let debugTopics = '' 8if (IS_WEB && typeof window !== 'undefined') { 9 const params = new URLSearchParams(window.location.search) 10 debugTopics = params.get('debug_topics') ?? '' 11} 12 13export function createBskyTopicsHeader(userInterests?: string) { 14 return { 15 'X-Bsky-Topics': debugTopics || userInterests || '', 16 } 17} 18 19export function aggregateUserInterests( 20 preferences?: UsePreferencesQueryResponse, 21) { 22 return preferences?.interests?.tags?.join(',') || '' 23} 24 25export function isBlueskyOwnedFeed(feedUri: string) { 26 const uri = new AtUri(feedUri) 27 return BSKY_FEED_OWNER_DIDS.includes(uri.host) 28}