Add support for unencrypted media
This commit is contained in:
@@ -23,6 +23,7 @@ export interface RoomMessageEvent extends BaseRoomEvent {
|
||||
msgtype?: MessageType;
|
||||
body?: string;
|
||||
};
|
||||
url?: string;
|
||||
file?: { url: string };
|
||||
};
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ export interface MatrixRoomMessage {
|
||||
event_id: string;
|
||||
rel_type: "m.replace" | string;
|
||||
};
|
||||
url?: string;
|
||||
file?: {
|
||||
url: string;
|
||||
};
|
||||
|
||||
@@ -79,6 +79,7 @@ export class RoomEventsManager {
|
||||
rel_type: m.data["m.relates_to"].rel_type ?? "",
|
||||
}
|
||||
: undefined,
|
||||
url: m.data.url,
|
||||
file: m.data.file,
|
||||
},
|
||||
};
|
||||
@@ -140,7 +141,7 @@ export class RoomEventsManager {
|
||||
reactions: new Map(),
|
||||
time_sent: evt.time,
|
||||
time_sent_dayjs: dayjs.unix(evt.time / 1000),
|
||||
image: data.content.file?.url,
|
||||
image: data.content.file?.url ?? data.content.url,
|
||||
content: data.content.body,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user