sendMessage method

Future<Message> sendMessage({
  1. required String conversationId,
  2. required String content,
  3. MessageType type = MessageType.text,
  4. String? replyToId,
})

Send a message.

Message is queued locally first, then sent when online. Returns immediately with optimistic message.

Implementation

Future<Message> sendMessage({
  required String conversationId,
  required String content,
  MessageType type = MessageType.text,
  String? replyToId,
}) async {
  return sendMessageWithParams(
    SendMessageParams(
      conversationId: conversationId,
      content: content,
      type: type,
      replyToId: replyToId,
    ),
  );
}