setReadMarker method

Future<void> setReadMarker(
  1. String? eventId, {
  2. String? mRead,
  3. bool? public,
})

Sets the position of the read marker for a given room, and optionally the read receipt's location. If you set public to false, only a private receipt will be sent. A private receipt is always sent if mRead is set. If no value is provided, the default from the client is used. You can leave out the eventId, which will not update the read marker but just send receipts, but there are few cases where that makes sense.

Implementation

Future<void> setReadMarker(String? eventId,
    {String? mRead, bool? public}) async {
  await client.setReadMarker(
    id,
    mFullyRead: eventId,
    mRead: (public ?? client.receiptsPublicByDefault) ? mRead : null,
    // we always send the private receipt, because there is no reason not to.
    mReadPrivate: mRead,
  );
  return;
}