send static method

Future<Message> send(
  1. String conversationId,
  2. Message message
)

Send message message to conversation with id conversationId.

Implementation

static Future<Message> send(String conversationId, Message message) async {
  MercuryRequest req = await _req();
  req.message = Message(text: message.text, conversationId: conversationId);
  if (message.replyTo.hasId())
    req.message.replyTo = Message(id: message.replyTo.id);

  MercuryResponse res = await _client.send(req);
  return res.message;
}