forget method

Future<void> forget()

Call the Matrix API to forget this room if you already left it.

Implementation

Future<void> forget() async {
  await client.database.forgetRoom(id);
  await client.forgetRoom(id);
  // Update archived rooms, otherwise an archived room may still be in the
  // list after a forget room call
  final roomIndex = client.archivedRooms.indexWhere((r) => r.room.id == id);
  if (roomIndex != -1) {
    client.archivedRooms.removeAt(roomIndex);
  }
  return;
}