Handle read receipts on web ui

This commit is contained in:
2025-12-01 18:30:22 +01:00
parent 30e63bfdb4
commit 7356a66e4a
6 changed files with 117 additions and 8 deletions

View File

@@ -15,6 +15,12 @@ export interface Room {
latest_event?: MatrixEvent;
}
export interface Receipt {
user: string;
event_id: string;
ts: number;
}
/**
* Find main member of room
*/
@@ -53,4 +59,16 @@ export class MatrixApiRoom {
})
).data;
}
/**
* Get a room receipts
*/
static async RoomReceipts(room: Room): Promise<Receipt[]> {
return (
await APIClient.exec({
method: "GET",
uri: `/matrix/room/${room.id}/receipts`,
})
).data;
}
}