Add support for more file formats

This commit is contained in:
2025-11-28 17:37:30 +01:00
parent c360432911
commit 62966473f0
4 changed files with 65 additions and 9 deletions

View File

@@ -1,4 +1,5 @@
import { APIClient } from "./ApiClient";
import type { MessageType } from "./matrix/MatrixApiEvent";
interface BaseRoomEvent {
time: number;
@@ -8,8 +9,6 @@ interface BaseRoomEvent {
origin_server_ts: number;
}
type MessageType = "m.text" | "m.image" | string;
export interface RoomMessageEvent extends BaseRoomEvent {
type: "RoomMessageEvent";
data: {

View File

@@ -1,11 +1,19 @@
import { APIClient } from "../ApiClient";
import type { Room } from "./MatrixApiRoom";
export type MessageType =
| "m.text"
| "m.image"
| "m.audio"
| "m.file"
| "m.video"
| "_OTHER_";
export interface MatrixRoomMessage {
type: "m.room.message";
content: {
body: string;
msgtype: "m.text" | "m.image" | string;
msgtype: MessageType;
"m.relates_to"?: {
event_id: string;
rel_type: "m.replace" | string;