调用大概是以下
Map att = _createMessageAtt(targetUser);
if (duration != null) {
att["duration"] = duration;
}
message.attributes = att;
final msg = await conversation.send(message: message);
数据是:
args:{clientId=6668888, file={path=/data/user/0/****/app_flutter/record/audio_1678868275345.aac, data=null, format=mp3, name=null, url=null}, conversationId=******************, message={clientId=6668888, typeMsgData={_lcattrs={duration=5, accountId=12139, targetAccountId=7989, nickName=yffhguf, headUrl=******, targetUserId=3661241367, userId=6668888, targetNickName=vvv01 , targetAvatar=*******.jpg}, _lctype=-3, _lctext=[Voice]}}}
send message from conv:***********, message:{"clientId":"6668888","typeMsgData":{"lcattrs":{"duration":5,"accountId":12139,"targetAccountId":7989,"nickName":"yffhguf","headUrl":"*****.jpg","targetUserId":"3661241367","userId":"6668888","targetNickName":"vvv01 ","targetAvatar":"******.jpg"},"lctype":-3,"_lctext":"[Voice]"}}, option:null
但是报错 LC.RTM.Exception(
code: 0,
essage: cn.leancloud.LCException: java.lang.ClassCastException: java.lang.String cannot be cast to java.util.Map,
details: java.lang.ClassCastException: java.lang.String cannot be cast to java.util.Map,
)