delete method

Future<void> delete()

Delete all matching messages based on Channel.history description.

  • if to is null and from in null, then it will work on all messages.
  • if to is null and from is defined, then it will work on all messages since from.
  • if to is defined and from is null, then it will work on all messages up to to.
  • if both to and from are defined, then it will work on messages that were sent between from and to.

Implementation

Future<void> delete() async {
  await defaultFlow(
    keyset: _keyset,
    core: _core,
    params:
        DeleteMessagesParams(_keyset, _channel.name, end: from, start: to),
    serialize: (object, [_]) => DeleteMessagesResult.fromJson(object),
  );
}