MCPcopy Create free account
hub / github.com/dailydotdev/apps / chatRoomQueryOptions

Function chatRoomQueryOptions

packages/shared/src/features/liveChat/queries.ts:40–47  ·  view source on GitHub ↗
(user: QueryUser, roomId: string)

Source from the content-addressed store, hash-verified

38// A room by id, for the chat page; polled like the post's room so the
39// occupant count and the room's end stay current.
40export const chatRoomQueryOptions = (user: QueryUser, roomId: string) =>
41 queryOptions<ChatRoom | null>({
42 queryKey: chatRoomQueryKey(user, roomId),
43 queryFn: () => getChatRoom(roomId),
44 staleTime: StaleTime.Default,
45 refetchInterval: LIVE_CHAT_ROOM_REFRESH_MS,
46 enabled: !!roomId,
47 });
48
49// The API answers for at most this many users per call.
50export const LIVE_CHAT_PRESENCE_MAX_USERS = 100;

Callers 2

TopicChatScreenFunction · 0.90
useLiveChatRoomFunction · 0.90

Calls 2

getChatRoomFunction · 0.90
chatRoomQueryKeyFunction · 0.85

Tested by

no test coverage detected