Use MatrixEvent provided by us.
This commit is contained in:
@@ -6,7 +6,7 @@ Please see LICENSE files in the repository root for full details.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import type { JSX } from "react";
|
import type { JSX } from "react";
|
||||||
import type { MatrixEvent } from "matrix-js-sdk/lib/matrix";
|
import type { MatrixEvent } from "../models/event";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Properties for all message components.
|
* Properties for all message components.
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ export { ModuleLoader, ModuleIncompatibleError } from "./loader";
|
|||||||
export type { Api, Module, ModuleFactory } from "./api";
|
export type { Api, Module, ModuleFactory } from "./api";
|
||||||
export type { Config, ConfigApi } from "./api/config";
|
export type { Config, ConfigApi } from "./api/config";
|
||||||
export type { I18nApi, Variables, Translations } from "./api/i18n";
|
export type { I18nApi, Variables, Translations } from "./api/i18n";
|
||||||
|
export type * from "./models/event";
|
||||||
export type * from "./api/custom-components";
|
export type * from "./api/custom-components";
|
||||||
export type * from "./api/legacy-modules";
|
export type * from "./api/legacy-modules";
|
||||||
export type * from "./api/legacy-customisations";
|
export type * from "./api/legacy-customisations";
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
import type { EventStatus, IEventRelation, Membership } from "matrix-js-sdk";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Representation of a Matrix event.
|
||||||
|
* @beta
|
||||||
|
*/
|
||||||
|
export interface MatrixEvent {
|
||||||
|
// Properties provided by the spec
|
||||||
|
eventId: string;
|
||||||
|
roomId?: string;
|
||||||
|
sender: string;
|
||||||
|
content: Record<string, unknown>;
|
||||||
|
unsigned: Record<string, unknown>;
|
||||||
|
type: string;
|
||||||
|
stateKey?: string;
|
||||||
|
originServerTs: number;
|
||||||
|
redacts?: string;
|
||||||
|
|
||||||
|
// Properties provided by the SDK
|
||||||
|
membership?: Membership;
|
||||||
|
status: EventStatus;
|
||||||
|
relation?: IEventRelation | null;
|
||||||
|
age?: number;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user