Handle read receipts on web ui
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user