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