(user: QueryUser, roomId: string)
| 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. |
| 40 | export 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. |
| 50 | export const LIVE_CHAT_PRESENCE_MAX_USERS = 100; |
no test coverage detected