Add method to send read receipts

This commit is contained in:
Christian Pauly 2019-06-11 14:13:30 +02:00
parent e2f7791daa
commit edf79f5d1c
1 changed files with 8 additions and 0 deletions

View File

@ -280,6 +280,14 @@ class Room {
});
}
Future<dynamic> sendReadReceipt(String eventID) async {
final dynamic resp = client.connection.jsonRequest(
type: "fully_read",
action: "/client/r0/rooms/$id/read_markers",
data: {"m.fully_read": eventID,"m.read": eventID,});
return resp;
}
/// Returns a Room from a json String which comes normally from the store.
static Future<Room> getRoomFromTableRow(Map<String, dynamic> row,
Client matrix) async {