Compare commits

...

1 Commits

Author SHA1 Message Date
Dan Abramov 397335be53 Hook debugTopics to override X-Bsky-Topics 2024-11-01 16:38:38 +00:00
+8 -1
View File
@@ -1,11 +1,18 @@
import {AtUri} from '@atproto/api'
import {BSKY_FEED_OWNER_DIDS} from '#/lib/constants'
import {isWeb} from '#/platform/detection'
import {UsePreferencesQueryResponse} from '#/state/queries/preferences'
let debugTopics = ''
if (isWeb && typeof window !== 'undefined') {
const params = new URLSearchParams(window.location.search)
debugTopics = params.get('debug_topics') ?? ''
}
export function createBskyTopicsHeader(userInterests?: string) {
return {
'X-Bsky-Topics': userInterests || '',
'X-Bsky-Topics': debugTopics || userInterests || '',
}
}