sendChatMessage static method

Future<ChatMessage> sendChatMessage(
  1. ChatMessageContent content,
  2. ChatId target
)

Implementation

static Future<ChatMessage> sendChatMessage(
    ChatMessageContent content, ChatId target) {
  Map<String, dynamic> sendChatMessageBody = {
    'content': content.toJSON(),
    'target': target.toJSON(),
  };
  return NativeBridge.async(
          'Communities.sendChatMessage', jsonEncode(sendChatMessageBody))
      .then((result) => ChatMessage.fromJSON(jsonDecode(result)));
}