Add support for more file formats
This commit is contained in:
@@ -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: {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user