sendMessage abstract method

Future<ChatMessage> sendMessage({
  1. required String chatId,
  2. required String authorId,
  3. required String text,
  4. String? replyToMessageId,
})

Sends a new message.

  • chatId: ID of the chat
  • authorId: ID of the author
  • text: Message text
  • replyToMessageId: ID of the message being replied to (optional)

Returns the created message or throws an exception on error.

Implementation

Future<ChatMessage> sendMessage({
  required String chatId,
  required String authorId,
  required String text,
  String? replyToMessageId,
});