Use thumbnail view when sending attachments

So we can preview videos etc.
This commit is contained in:
N-Pex 2025-07-03 10:54:31 +02:00
parent 2b2c736311
commit e5bb2d7202
4 changed files with 164 additions and 93 deletions

View file

@ -8,11 +8,13 @@ export type KeanuEventExtension = {
replyEvent?: MatrixEvent & KeanuEventExtension;
}
export type KeanuEvent = MatrixEvent & KeanuEventExtension;
export type EventAttachmentUrlType = "src" | "thumbnail";
export type EventAttachmentUrlData = {data: string, type: EventAttachmentUrlType};
export type EventAttachment = {
event: MatrixEvent & KeanuEventExtension;
event: KeanuEvent;
name: string;
src?: string;
srcSize: number;
@ -28,7 +30,6 @@ export type EventAttachment = {
release: (src: boolean, thumbnail: boolean) => void;
};
export type KeanuEvent = MatrixEvent & KeanuEventExtension;
export type KeanuRoom = Room & {
displayType: "im.keanu.room_type_default" | "im.keanu.room_type_voice" | "im.keanu.room_type_file" | "im.keanu.room_type_channel" | undefined;