MsgBatchSend
功能介绍
批量发送消息
批量发送消息的接口,每个msg_batch_send_param_identifier_array发送成功与否,通过回调cb返回。
参数详解
重载1
重载2
返回模板
TIMResult
调用成功后回调函数参数:
code:int
desc:string
json_param:
'[
{
"msg_batch_send_result_code" : 0,
"msg_batch_send_result_desc" : "",
"msg_batch_send_result_identifier" : "test_win_05",
"msg_batch_send_result_msg" : {
"message_client_time" : 1558598923,
"message_conv_id" : "test_win_05",
"message_conv_type" : 1,
"message_custom_int" : 0,
"message_custom_str" : "",
"message_elem_array" : [
{
"elem_type" : 0,
"text_elem_content" : "this is batch send msgs"
}
],
"message_is_from_self" : true,
"message_is_online_msg" : false,
"message_is_peer_read" : false,
"message_is_read" : true,
"message_priority" : 1,
"message_rand" : 673379256,
"message_sender" : "test_win_01",
"message_seq" : 10274,
"message_server_time" : 1558598924,
"message_status" : 2
}
},
{
"msg_batch_send_result_code" : 0,
"msg_batch_send_result_desc" : "",
"msg_batch_send_result_identifier" : "test_win_02",
"msg_batch_send_result_msg" : {
"message_client_time" : 1558598923,
"message_conv_id" : "test_win_02",
"message_conv_type" : 1,
"message_custom_int" : 0,
"message_custom_str" : "",
"message_elem_array" : [
{
"elem_type" : 0,
"text_elem_content" : "this is batch send msgs"
}
],
"message_is_from_self" : true,
"message_is_online_msg" : false,
"message_is_peer_read" : false,
"message_is_read" : true,
"message_priority" : 1,
"message_rand" : 673460408,
"message_sender" : "test_win_01",
"message_seq" : 10276,
"message_server_time" : 1558598924,
"message_status" : 2
}
}
]'// Json Key请参考[MsgBatchSendResult]
user_data:string
返回值详解
名称 |
数值类型 |
描述 |
TIMResult |
TIMResult |
调用接口的返回值 |
code |
int |
值为ERR_SUCC表示成功,其他值表示失败。详情请参考 错误码 |
desc |
string |
错误描述字符串 |
json_param |
string |
Json字符串,不同的接口,Json字符串不一样 Json Key请参考MsgBatchSendResult |
user_data |
string |
ImSDK负责透传的用户自定义数据,未做任何处理 |