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

Function dmTypingQueryOptions

packages/shared/src/features/messages/queries.ts:339–348  ·  view source on GitHub ↗
(user: QueryUser, peerId: string)

Source from the content-addressed store, hash-verified

337// Whether the peer is typing right now. Live updates set it and nothing
338// fetches it, so it starts false and only a reconnect resets it.
339export const dmTypingQueryOptions = (user: QueryUser, peerId: string) =>
340 queryOptions<boolean>({
341 queryKey: generateQueryKey(RequestKey.DirectMessages, user, 'typing', {
342 peerId,
343 }),
344 queryFn: () => false,
345 initialData: false,
346 staleTime: Infinity,
347 enabled: !!user?.id && !!peerId,
348 });
349
350export const dmPeerQueryKey = (user: QueryUser, peerId: string) =>
351 generateQueryKey(RequestKey.DirectMessagePeer, user, peerId);

Callers 3

ConversationThreadFunction · 0.90
setTypingFunction · 0.90

Calls 1

generateQueryKeyFunction · 0.90

Tested by

no test coverage detected