fetchMessageActions method

Future<FetchMessageActionsResult> fetchMessageActions(
  1. String channel, {
  2. Timetoken? from,
  3. Timetoken? to,
  4. int? limit = 100,
  5. Keyset? keyset,
  6. String? using,
})
inherited

Returns all message actions of a given channel.

Pagination can be controlled using from, to and limit parameters.

If from is not provided, the server uses the current time.

If both to or limit are null, it will fetch the maximum amount of message actions - the server will try and retrieve all actions for the channel, going back in time forever. default and maximum value for limit is 100.

In some cases, due to internal limitations on the number of queries performed per request, the server will not be able to give the full range of actions requested.

Implementation

Future<FetchMessageActionsResult> fetchMessageActions(String channel,
    {Timetoken? from,
    Timetoken? to,
    int? limit = 100,
    Keyset? keyset,
    String? using}) async {
  keyset ??= keysets[using];

  Ensure(channel).isNotEmpty('channel');

  return defaultFlow(
      keyset: keyset,
      core: this,
      params: FetchMessageActionsParams(keyset, channel,
          start: from, end: to, limit: limit),
      serialize: (object, [_]) => FetchMessageActionsResult.fromJson(object));
}