Can retrieve room media

This commit is contained in:
2025-11-25 14:54:02 +01:00
parent 2adbf146d0
commit b7378aa4dc
8 changed files with 156 additions and 24 deletions

View File

@@ -1,3 +1,4 @@
import dayjs from "dayjs";
import type {
MatrixEvent,
MatrixEventsList,
@@ -14,6 +15,7 @@ export interface Message {
event_id: string;
account: string;
time_sent: number;
time_sent_dayjs: dayjs.Dayjs;
modified: boolean;
reactions: MessageReaction[];
content: string;
@@ -80,6 +82,7 @@ export class RoomEventsManager {
modified: false,
reactions: [],
time_sent: evt.time,
time_sent_dayjs: dayjs.unix(evt.time / 1000),
image: data.content.file?.url,
content: data.content.body,
});