getThreadMessages method

Future<(Exception?, List<ThreadMessage>?)> getThreadMessages(
  1. String threadId
)

Implementation

Future<(Exception?, List<ThreadMessage>?)> getThreadMessages(
    String threadId) async {
  final threadMessages = await message.getThreadMessages(threadId);

  if (threadMessages == null) {
    return left(MissingArgumentsException('Thread messages is null'));
  }

  return right(threadMessages);
}