mirror of
https://github.com/vector-im/element-web.git
synced 2026-05-05 12:16:53 +02:00
Use MatrixEvent provided by us.
This commit is contained in:
parent
66f83a9663
commit
ead847ec6a
@ -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.
|
||||
|
||||
@ -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";
|
||||
|
||||
24
packages/element-web-module-api/src/models/event.ts
Normal file
24
packages/element-web-module-api/src/models/event.ts
Normal 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;
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user