readLog method

  1. @override
Future<List<RelayLogEntry>> readLog(
  1. String roomId, {
  2. int afterSeq = 0,
})
override

The roomId log entries with a sequence number greater than afterSeq, ordered by sequence number.

Implementation

@override
Future<List<RelayLogEntry>> readLog(
  String roomId, {
  int afterSeq = 0,
}) async {
  final room = _rooms[roomId];
  if (room == null) {
    return const [];
  }
  return room.log.where((entry) => entry.seq > afterSeq).toList();
}