increaseMetaCounters method

Future<Map<String, int>> increaseMetaCounters(
  1. Map<String, int> metaCounters
)

Increases meta counters. This increases atomically the keyed meta counter by the specified value.

Implementation

Future<Map<String, int>> increaseMetaCounters(
    Map<String, int> metaCounters) async {
  sbLog.i(StackTrace.current, 'metaCounters: $metaCounters');
  checkUnsupportedAction();

  if (metaCounters.isEmpty) {
    throw InvalidParameterException();
  }

  return await chat.apiClient.send(
    ChannelMetaCounterUpdateRequest(
      chat,
      channelType: channelType,
      channelUrl: channelUrl,
      metaCounter: metaCounters,
      mode: UpdateMetaCounterMode.increase,
    ),
  );
}