mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-30 06:28:12 +00:00
feat(chat): join users to rooms on sign-in
This commit is contained in:
@@ -1,19 +0,0 @@
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
|
||||
import { chatApi } from "./chatApi";
|
||||
|
||||
export const CHAT_SSO_KEY = ["chat", "sso"] as const;
|
||||
|
||||
/**
|
||||
* The login_token this resolves to is single-use and expires in 5 minutes
|
||||
* (Synapse default) — the global `staleTime: 0` (queryClient.ts) already
|
||||
* means every fresh mount of the launch page refetches rather than reusing
|
||||
* a possibly-spent link.
|
||||
*/
|
||||
export function useChatSso() {
|
||||
return useQuery({
|
||||
queryKey: CHAT_SSO_KEY,
|
||||
queryFn: chatApi.getSsoUrl,
|
||||
retry: false,
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user