addForum method

String addForum(
  1. String spaceId,
  2. String name,
  3. Map<String, String> access, {
  4. String defaultSort = 'last_activity',
})

Adds a forum to spaceId that the principals of access see with their level, sorted by defaultSort (forum_default_sort); returns the channel ID.

Implementation

String addForum(
  String spaceId,
  String name,
  Map<String, String> access, {
  String defaultSort = 'last_activity',
}) {
  final id = addChannel(spaceId, name, access);
  channels[id]!.json
    ..['kind'] = 'forum'
    ..['forum_default_sort'] = defaultSort;
  return id;
}