sendMessage method
void
sendMessage(
- String msg,
- MessageFormat type,
- Int64 consultId, {
- Int64 replyMsgId = Int64.ZERO,
- WithAutoReply? withAutoReply = null,
- Int64 payload_Id = Int64.ZERO,
- String fileName = '',
- int fileSize = 0,
发送文本类型、图片类型的消息 @param msg 消息内容或图片url,音频url..。
Implementation
void sendMessage(String msg, MessageFormat type, Int64 consultId,
{Int64 replyMsgId = Int64.ZERO,
WithAutoReply? withAutoReply = null,
Int64 payload_Id = Int64.ZERO,
String fileName = '',
int fileSize = 0}) {
this.consultId = consultId;
this.replyMsgId = replyMsgId;
this.withAutoReply = withAutoReply;
_fileName = fileName;
_fileSize = fileSize;
_msgFormat = type;
switch (type) {
case MessageFormat.MSG_FILE:
_sendFileMessage(msg);
break;
case MessageFormat.MSG_IMG:
_sendImageMessage(msg);
break;
case MessageFormat.MSG_VIDEO:
//_sendVideoMessage(msg);
break;
default:
_sendTextMessage(msg);
}
_doSend(payload_Id: payload_Id);
}