RocketChat/Rocket.Chat

View on GitHub
apps/meteor/client/contexts/UserPresenceContext.ts

Summary

Maintainability
A
0 mins
Test Coverage
import { createContext } from 'react';

import type { Subscribable } from '../definitions/Subscribable';
import type { UserPresence } from '../lib/presence';

type UserPresenceContextValue = {
    queryUserData: (uid: string) => Subscribable<UserPresence | undefined>;
};

export const UserPresenceContext = createContext<UserPresenceContextValue | undefined>(undefined);