sendMessage method

Future<DecodedMessage> sendMessage(
  1. Conversation conversation,
  2. Object content, {
  3. ContentTypeId? contentType,
})

This sends a new message to the conversation. It returns the DecodedMessage to simplify optimistic local updates. e.g. you can display the DecodedMessage immediately without having to wait for it to come back down the stream.

Implementation

Future<DecodedMessage> sendMessage(
  Conversation conversation,
  Object content, {
  xmtp.ContentTypeId? contentType,
  // TODO: support fallback and compression
}) =>
    _conversations.sendMessage(
      conversation,
      content,
      contentType: contentType,
    );