cast branded chat convo params with the syntax types
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import {type DidString} from '@atproto/syntax'
|
||||
import {useQuery} from '@tanstack/react-query'
|
||||
|
||||
import {useChatClient} from '#/state/session'
|
||||
@@ -18,9 +19,7 @@ export function useGetConvoAvailabilityQuery(
|
||||
queryFn: async () => {
|
||||
return await client.call(chat.bsky.convo.getConvoAvailability, {
|
||||
// callers pass an already-resolved actor did
|
||||
members: [
|
||||
did,
|
||||
] as chat.bsky.convo.getConvoAvailability.$Params['members'],
|
||||
members: [did as DidString],
|
||||
})
|
||||
},
|
||||
staleTime: STALE.INFINITY,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import {type ChatBskyConvoGetConvoForMembers} from '@atproto/api'
|
||||
import {type DidString} from '@atproto/syntax'
|
||||
import {useMutation, useQueryClient} from '@tanstack/react-query'
|
||||
|
||||
import {logger} from '#/logger'
|
||||
@@ -20,8 +21,7 @@ export function useGetConvoForMembers({
|
||||
mutationFn: async (members: string[]) => {
|
||||
return await client.call(chat.bsky.convo.getConvoForMembers, {
|
||||
// callers pass already-resolved actor dids
|
||||
members:
|
||||
members as chat.bsky.convo.getConvoForMembers.$Params['members'],
|
||||
members: members as DidString[],
|
||||
})
|
||||
},
|
||||
onSuccess: data => {
|
||||
|
||||
Reference in New Issue
Block a user