createFaceMessage static method

Object createFaceMessage({
  1. required String userID,
  2. String convType = 'C2C',
  3. required int index,
  4. required dynamic data,
  5. String cloudCustomData = '',
  6. bool needReadReceipt = false,
  7. int priority = 0,
})

Implementation

static Object createFaceMessage(
    {required String userID,
    String convType = 'C2C',
    required int index,
    required data,
    String cloudCustomData = '',
    bool needReadReceipt = false,
    int priority = 0}) {
  final textParams = {
    "to": userID,
    "conversationType": convType,
    "needReadReceipt": needReadReceipt,
    "cloudCustomData": cloudCustomData,
    "priority": MessagePriorityWeb.convertMsgPriorityToWeb(priority),
    "payload": mapToJSObj({"index": index, "data": data}),
  };
  return mapToJSObj(textParams);
}