sendInviteMsgToCallee method
Implementation
Future<void> sendInviteMsgToCallee(String userId, ChatCallKitCallType type,
String callId, String channel, Map<String, String>? ext) async {
String sType = 'voice';
if (type == ChatCallKitCallType.multi) {
sType = 'conference';
} else if (type == ChatCallKitCallType.video_1v1) {
sType = 'video';
}
final msg = ChatMessage.createTxtSendMessage(
targetId: userId, content: 'invite info: $sType');
Map attr = {
kMsgType: kMsgTypeValue,
kAction: kInviteAction,
kCallId: callId,
kCallType: type.index,
kCallerDevId: model.curDevId,
kChannelName: channel,
kTs: ts
};
if (ext != null) {
attr[kExt] = ext;
}
msg.attributes = attr;
ChatClient.getInstance.chatManager.sendMessage(msg);
chatLog("sendInviteMsgToCallee", msg);
}