matrix-react-sdk
Version:
SDK for matrix.org using React
24 lines (23 loc) • 1.15 kB
TypeScript
import React from "react";
import { MatrixEvent, MatrixClient } from "matrix-js-sdk/src/matrix";
export declare function textForLocationEvent(event: MatrixEvent): () => string;
/**
* Determines whether the given event has text to display.
*
* @param client The Matrix Client instance for the logged-in user
* @param ev The event
* @param showHiddenEvents An optional cached setting value for showHiddenEventsInTimeline
* to avoid hitting the settings store
*/
export declare function hasText(ev: MatrixEvent, client: MatrixClient, showHiddenEvents?: boolean): boolean;
/**
* Gets the textual content of the given event.
*
* @param ev The event
* @param client The Matrix Client instance for the logged-in user
* @param allowJSX Whether to output rich JSX content
* @param showHiddenEvents An optional cached setting value for showHiddenEventsInTimeline
* to avoid hitting the settings store
*/
export declare function textForEvent(ev: MatrixEvent, client: MatrixClient): string;
export declare function textForEvent(ev: MatrixEvent, client: MatrixClient, allowJSX: true, showHiddenEvents?: boolean): string | React.ReactNode;