Add group chat join links to supported embed types (#10454)

This commit is contained in:
DS Boyce
2026-06-04 08:11:50 -07:00
committed by GitHub
parent c79b5bfa08
commit 08cd4e58b0
12 changed files with 434 additions and 22 deletions
+4 -2
View File
@@ -20,9 +20,11 @@ export const createJoinLinkPreviewQueryKey = (args: {
export function useJoinLinkPreviewsQuery({
codes,
hasSession,
staleTime = STALE.MINUTES.ONE,
}: {
codes?: string[]
hasSession: boolean
staleTime?: number
}) {
const agent = useAgent()
@@ -45,7 +47,7 @@ export function useJoinLinkPreviewsQuery({
}
},
enabled: codes != null && codes.length > 0,
staleTime: STALE.SECONDS.FIFTEEN,
staleTime,
})
}
@@ -66,7 +68,7 @@ export function usePrefetchJoinLinkPreviews() {
: await previewAgent.chat.bsky.group.getJoinLinkPreviews({codes})
return res.data
},
staleTime: STALE.SECONDS.FIFTEEN,
staleTime: STALE.MINUTES.ONE,
})
}
}