Add support for unencrypted media

This commit is contained in:
2025-11-28 17:22:58 +01:00
parent 123e069d18
commit c360432911
4 changed files with 5 additions and 4 deletions

View File

@@ -23,6 +23,7 @@ export interface RoomMessageEvent extends BaseRoomEvent {
msgtype?: MessageType;
body?: string;
};
url?: string;
file?: { url: string };
};
}

View File

@@ -10,6 +10,7 @@ export interface MatrixRoomMessage {
event_id: string;
rel_type: "m.replace" | string;
};
url?: string;
file?: {
url: string;
};

View File

@@ -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,
});
}