51010
error will be reported. Groups that are no longer used should be promptly deleted.Attribute | Definition | Description |
groupName | Conversation group name | It must be greater than 0 in length and can contain up to 32 bytes; otherwise, the 51011 error will be reported. |
conversationIDList | List of conversation IDs | It cannot be empty. |
// Create a conversation groupTIMResult res = TencentIMSDK.ConvCreateConversationGroup("groupName", new List<string> {conv_id}, (int code, string desc, List<ConversationOperationResult> results, string user_data)=>{// Async result of the conversation group creation});
51009
error will be reported.// Delete the conversation groupTIMResult res = TencentIMSDK.ConvDeleteConversationGroup("groupName", (int code, string desc, string result, string user_data)=>{// Async result of the conversation group deletion});
// Rename a conversation groupTIMResult res = TencentIMSDK.ConvRenameConversationGroup("oldGroupName", "newGroupName", (int code, string desc, string result, string user_data)=>{// Async result of the conversation group renaming});
// Get the list of conversation groupsTIMResult res = TencentIMSDK.ConvGetConversationGroupList((int code, string desc, List<string> results, string user_data)=>{// Async result of the conversation group list getting});
ConvGetConversationListByFilter
(details) API.// Get the conversation listConversationListFilter filter = new ConversationListFilter{conversation_list_filter_conv_type: TIMConvType.kTIMConv_C2C,// Conversation typeconversation_list_filter_mark_type: TIMConversationMarkType.kTIMConversationMarkTypeStar,// Conversation mark typeconversation_list_filter_conversation_group: "groupName"// Named of the group whose data is to be pulled};ulong next_seq = 0; // Pulling cursoruint count = 10; // Pulling count// Advanced API for getting the conversation listTIMResult res = TencentIMSDK.ConvGetConversationListByFilter(filter, next_seq, count, (int code, string desc, ConversationListResult result, string user_data)=>{// Async result of the conversation list gettingif (code == 0) {// Pulled successfullybool isFinished = result.conversation_list_result_is_finished; // Whether pulling is completednext_seq = result.conversation_list_result_next_seq; // Cursor for subsequent paged pullingvar conversationList = result.conversation_list_result_conv_list; // List of messages pulled this time// If more conversations need to be pulled, use the returned `nextSeq` to continue pulling until `isFinished` is `true`.}});
ConvAddConversationsToGroup
(details) API to add a conversation to the group.// Add a conversation to a conversation groupTIMResult res = TencentIMSDK.ConvAddConversationsToGroup("groupName", new List<string> {conv_id}, (int code, string desc, List<ConversationOperationResult> results, string user_data)=>{// Async result of adding a conversation to a conversation group});
// Delete a conversation from a conversation groupTIMResult res = TencentIMSDK.ConvDeleteConversationsFromGroup("groupName", new List<string> {conv_id}, (int code, string desc, List<ConversationOperationResult> results, string user_data)=>{// Async result of deleting a conversation from a conversation group});
// Set the conversation listenerTencentIMSDK.SetConvEventCallback((TIMConvEvent conv_event, List<ConvInfo> conv_list, string user_data)=>{// Process the callback logic});
Was this page helpful?