createTextAtMessage static method

Object createTextAtMessage({
  1. required String groupID,
  2. required String text,
  3. required List atList,
  4. String cloudCustomData = '',
  5. bool needReadReceipt = false,
  6. int priority = 0,
})

Implementation

static Object createTextAtMessage(
    {required String groupID,
    required String text,
    required List<dynamic> atList,
    String cloudCustomData = '',
    bool needReadReceipt = false,
    int priority = 0}) {
  final textParams = {
    "to": groupID,
    "conversationType": "GROUP",
    "cloudCustomData": cloudCustomData,
    "needReadReceipt": needReadReceipt,
    "priority": MessagePriorityWeb.convertMsgPriorityToWeb(priority),
    "payload": mapToJSObj({"text": text, "atUserList": atList}),
  };
  return mapToJSObj(textParams);
}