setHistoryVisibility method

Future<void> setHistoryVisibility(
  1. HistoryVisibility historyVisibility
)

Changes the history visibility. You should check first if the user is able to change it.

Implementation

Future<void> setHistoryVisibility(HistoryVisibility historyVisibility) async {
  await client.setRoomStateWithKey(
    id,
    EventTypes.HistoryVisibility,
    '',
    {
      'history_visibility': _historyVisibilityMap[historyVisibility],
    },
  );
  return;
}