sendOpenChannelMessage method

Future<void> sendOpenChannelMessage(
  1. {String channelUrl,
  2. String originUserId,
  3. String message}
)

Implementation

Future<void> sendOpenChannelMessage(
    {String channelUrl, String originUserId, String message}) async {
  String parentURL = this._openChannelsApi;
  String finalURL = '$parentURL$channelUrl/messages';
  Map<String, dynamic> body = {
    'message_type': 'MESG',
    'user_id': originUserId,
    'message': message,
  };
  var result = await this._rest.postTo(finalURL, this._defaultHeaders, body);
  return result;
}