Use MatrixEvent provided by us.

This commit is contained in:
Half-Shot 2025-06-17 13:16:01 +01:00
parent 66f83a9663
commit ead847ec6a
3 changed files with 26 additions and 1 deletions

View File

@ -6,7 +6,7 @@ Please see LICENSE files in the repository root for full details.
*/
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.

View File

@ -9,6 +9,7 @@ export { ModuleLoader, ModuleIncompatibleError } from "./loader";
export type { Api, Module, ModuleFactory } from "./api";
export type { Config, ConfigApi } from "./api/config";
export type { I18nApi, Variables, Translations } from "./api/i18n";
export type * from "./models/event";
export type * from "./api/custom-components";
export type * from "./api/legacy-modules";
export type * from "./api/legacy-customisations";

View File

@ -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;
}