An ATproto social media client -- with an independent Appview.
7
fork

Configure Feed

Select the types of activity you want to include in your feed.

at main 25 lines 632 B view raw
1import {useQuery} from '@tanstack/react-query' 2 3import {DM_SERVICE_HEADERS} from '#/lib/constants' 4import {useAgent} from '#/state/session' 5import {STALE} from '..' 6 7const RQKEY_ROOT = 'convo-availability' 8export const RQKEY = (did: string) => [RQKEY_ROOT, did] 9 10export function useGetConvoAvailabilityQuery(did: string) { 11 const agent = useAgent() 12 13 return useQuery({ 14 queryKey: RQKEY(did), 15 queryFn: async () => { 16 const {data} = await agent.chat.bsky.convo.getConvoAvailability( 17 {members: [did]}, 18 {headers: DM_SERVICE_HEADERS}, 19 ) 20 21 return data 22 }, 23 staleTime: STALE.INFINITY, 24 }) 25}