setAllMessagesReadWithResult method

Future<int?> setAllMessagesReadWithResult(
  1. String channelSid,
  2. TwilioConversationsClient? _chatClient
)

Implementation

Future<int?> setAllMessagesReadWithResult(String channelSid,
    TwilioWebClient.TwilioConversationsClient? _chatClient) async {
  try {
    final channel = await promiseToFuture<TwilioConversationsChannel>(
        _chatClient!.getConversationBySid(channelSid));
    return await promiseToFuture<int>(channel.setAllMessagesRead());
  } catch (e) {
    Logging.debug('error: setAllMessagesReadWithResult ${e}');
    return 0;
  }
}