MsgBatchSend
introduction
Send batch messages
Batch send message, each msg_batch_send_param_identifier_array's sending result will be informed by callback.
Parameter details
overload1
Parameter name |
Parameter type |
Required |
Description |
json_batch_send_param |
MsgBatchSendParam |
Required |
Batch message param |
callback |
ValueCallback< List< MsgBatchSendResult > > |
Required |
Asynchronous callback The format of json_param in the return value is json |
overload2
Parameter name |
Parameter type |
Required |
Description |
json_batch_send_param |
MsgBatchSendParam |
Required |
Batch message param |
callback |
ValueCallback< string > |
Required |
Asynchronous callback The format of json_param in the return value is string |
Returned template
TIMResult
The parameters of the callback function after successfully calling the API:
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
}
}
]'// For the meaning of Json Key, please refer to [MsgBatchSendResult]
user_data:string
Return value details
name |
type |
description |
TIMResult |
TIMResult |
Return value of calling API |
code |
int |
Result error code: Error Codes |
desc |
string |
The description of the error. |
json_param |
string |
Json string. Calling different API will get different Json strings. For the meaning of Json Key, please refer to MsgBatchSendResult |
user_data |
string |
User-defined data transfered by ImSDK without any processing |