제품 개요
Basic Concepts
응용 시나리오
기능 소개
계정 시스템
사용자 정보 및 관계망
메시지 관리
그룹 시스템
Official Account
Audio/Video Call
사용 제한
ConvGetConvList API (details) to get the conversation list. This API pulls locally cached conversations. If any server conversation is updated, the SDK will automatically sync the update and notify you in the TIMConvEventCallback callback.ConvInfo objects.TIMResult res = TencentIMSDK.ConvGetConvList((int code, string desc, List<ConvInfo> info_list, string user_data)=>{// Process the async logic});
SetConvEventCallback API (details) to add a conversation listener to receive conversation change events.TencentIMSDK.SetConvEventCallback((TIMConvEvent conv_event, List<ConvInfo> conv_list, string user_data)=>{// Process the callback logic});
TIMConvEvent (details) to get the notification of a conversation list change.Event | Description | Suggestion |
kTIMConvEvent_Add | A new conversation was added. | Re-sort the conversations when the user receives a one-to-one message from a new colleague or is invited to a new group. |
kTIMConvEvent_Del | A conversation was deleted. | Trigger this event when the user deletes a conversation. |
kTIMConvEvent_Update | A conversation was updated. | Trigger this event when the unread count of a conversation changes or a new message is received. |
kTIMConvEvent_Start | A conversation was started. | - |
kTIMConvEvent_Finish | A conversation was ended. | - |
RemoveConvEventCallback API (details) to remove a specified conversation listener to stop receiving conversation change events. If null is passed in, all conversation listeners will be removed.
This step is optional and can be performed as needed.TencentIMSDK.RemoveConvEventCallback();
conv_last_msg of ConvInfo as the data source for implementation. However, in some cases, if you don't want some messages (such as system tips) to be displayed as the latest message in a conversation, you can set message_excluded_from_last_message to false/no when calling MsgSendMessage.피드백