sendAnswerMsg method
Implementation
void sendAnswerMsg(
String remoteUserId, String callId, String result, String devId) async {
ChatMessage msg = ChatMessage.createCmdSendMessage(
targetId: remoteUserId, action: "rtcCall");
Map attributes = {
kMsgType: kMsgTypeValue,
kAction: kAnswerCallAction,
kCallId: callId,
kCalleeDevId: model.curDevId,
kCallerDevId: devId,
kCallResult: result,
kTs: ts,
};
msg.attributes = attributes;
ChatClient.getInstance.chatManager.sendMessage(msg);
confirmTimer = Timer.periodic(const Duration(seconds: 5), (timer) {
timer.cancel();
confirmTimer = null;
});
chatLog("sendAnswerMsg", msg);
}