about summary refs log tree commit diff
path: root/src/state/queries/handle-availability.ts
diff options
context:
space:
mode:
authorhailey <hailey@blueskyweb.xyz>2025-08-26 17:13:11 -0700
committerGitHub <noreply@github.com>2025-08-26 17:13:11 -0700
commita1ed59e0eeb03d1f587512a1e567ebc298d71b38 (patch)
tree4c0beabb5682153bb9fbf1e3b682201ddfcdb6ca /src/state/queries/handle-availability.ts
parent39c6984c6edabcb432ef884e7d3b12ae51a2c09e (diff)
downloadvoidsky-a1ed59e0eeb03d1f587512a1e567ebc298d71b38.tar.zst
use an env var for configurable proxy header (#8863)
Diffstat (limited to 'src/state/queries/handle-availability.ts')
-rw-r--r--src/state/queries/handle-availability.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/state/queries/handle-availability.ts b/src/state/queries/handle-availability.ts
index 9391f5d09..06fc6eebb 100644
--- a/src/state/queries/handle-availability.ts
+++ b/src/state/queries/handle-availability.ts
@@ -1,4 +1,4 @@
-import {Agent, ComAtprotoTempCheckHandleAvailability} from '@atproto/api'
+import {ComAtprotoTempCheckHandleAvailability} from '@atproto/api'
 import {useQuery} from '@tanstack/react-query'
 
 import {
@@ -10,6 +10,7 @@ import {createFullHandle} from '#/lib/strings/handles'
 import {logger} from '#/logger'
 import {useDebouncedValue} from '#/components/live/utils'
 import * as bsky from '#/types/bsky'
+import {Agent} from '../session/agent'
 
 export const RQKEY_handleAvailability = (
   handle: string,
@@ -74,7 +75,7 @@ export async function checkHandleAvailability(
   },
 ) {
   if (serviceDid === BSKY_SERVICE_DID) {
-    const agent = new Agent({service: BSKY_SERVICE})
+    const agent = new Agent(null, {service: BSKY_SERVICE})
     // entryway has a special API for handle availability
     const {data} = await agent.com.atproto.temp.checkHandleAvailability({
       handle,
@@ -109,7 +110,7 @@ export async function checkHandleAvailability(
     }
   } else {
     // 3rd party PDSes won't have this API so just try and resolve the handle
-    const agent = new Agent({service: PUBLIC_BSKY_SERVICE})
+    const agent = new Agent(null, {service: PUBLIC_BSKY_SERVICE})
     try {
       const res = await agent.resolveHandle({
         handle,