UNPKG

matrix-react-sdk

Version:
26 lines (25 loc) 870 B
import { Poll, MatrixClient } from "matrix-js-sdk/src/matrix"; /** * Get poll instances from a room * Updates to include new polls * @param roomId - id of room to retrieve polls for * @param matrixClient - client * @returns {Map<string, Poll>} - Map of Poll instances */ export declare const usePolls: (roomId: string, matrixClient: MatrixClient) => { polls: Map<string, Poll>; }; /** * Get all poll instances from a room * Fetch their responses (using cached poll responses) * Updates on: * - new polls added to room * - new responses added to polls * - changes to poll ended state * @param roomId - id of room to retrieve polls for * @param matrixClient - client * @returns {Map<string, Poll>} - Map of Poll instances */ export declare const usePollsWithRelations: (roomId: string, matrixClient: MatrixClient) => { polls: Map<string, Poll>; };