archive method

Future archive(
  1. bool archive
)

Archive or un-archive the topic. Wrapper for Tinode.setMeta

Implementation

Future archive(bool archive) {
  if (private && private.arch == archive) {
    return Future.error(Exception('Cannot publish on inactive topic'));
  }
  return setMeta(SetParams(
      desc:
          TopicDescription(private: {'archive': archive ? true : DEL_CHAR})));
}