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

Function dmTypingQueryOptions

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

Source from the content-addressed store, hash-verified

323// Whether the peer is typing right now. Live updates set it and nothing
324// fetches it, so it starts false and only a reconnect resets it.
325export const dmTypingQueryOptions = (user: QueryUser, peerId: string) =>
326 queryOptions<boolean>({
327 queryKey: generateQueryKey(RequestKey.DirectMessages, user, 'typing', {
328 peerId,
329 }),
330 queryFn: () => false,
331 initialData: false,
332 staleTime: Infinity,
333 enabled: !!user?.id && !!peerId,
334 });
335
336// A peer we already talk to comes from the conversation; anyone else, such as
337// a profile's "Message" button, is looked up as a regular daily.dev user.

Callers 3

ConversationThreadFunction · 0.90
setTypingFunction · 0.90

Calls 1

generateQueryKeyFunction · 0.90

Tested by

no test coverage detected