createMereMessage static method

Object createMereMessage({
  1. required String userID,
  2. required List messageList,
  3. required String title,
  4. required List<String> abstractList,
  5. required String compatibleText,
  6. bool needReadReceipt = false,
  7. String cloudCustomData = '',
  8. String convType = 'C2C',
  9. int priority = 0,
})

Implementation

static Object createMereMessage(
    {required String userID,
    required List<dynamic> messageList,
    required String title,
    required List<String> abstractList,
    required String compatibleText,
    bool needReadReceipt = false,
    String cloudCustomData = '',
    String convType = 'C2C',
    int priority = 0}) {
  final params = {
    "to": userID,
    "conversationType": convType,
    "cloudCustomData": cloudCustomData,
    "needReadReceipt": needReadReceipt,
    "priority": MessagePriorityWeb.convertMsgPriorityToWeb(priority),
    "payload": mapToJSObj({
      "messageList": messageList,
      "title": title,
      "abstractList": abstractList,
      "compatibleText": compatibleText
    }),
  };

  return mapToJSObj(params);
}