kTIMConversationMarkTypeUnread
,会话的底层的未读数并不会发生改变。属性 | 含义 | 说明 |
conversationIDList | 会话 ID 列表 | 一次标记最大支持 100 个会话 |
markType | 标记类型 | 会话标星、会话标记未读、会话折叠、会话隐藏等 |
enableMark | 标记/取消标记 | 标记或取消标记 |
//标记会话TIMResult res = TencentIMSDK.ConvMarkConversation(new List<string> {conv_id}, TIMConversationMarkType.kTIMConversationMarkTypeStar, true, (int code, string desc, List<ConversationOperationResult> results, string user_data)=>{// 标记会话异步结果});
ConvInfo
的 conv_mark_array
(点击查看详情) 字段会发生变更,您可以调用 SetConvEventCallback
(点击查看详情) 接口监听会话变更通知。//设置会话监听器TencentIMSDK.SetConvEventCallback((TIMConvEvent conv_event, List<ConvInfo> conv_list, string user_data)=>{// 处理回调逻辑});
//获取会话列表ConversationListFilter filter = new ConversationListFilter{conversation_list_filter_conv_type: TIMConvType.kTIMConv_C2C,//会话类型conversation_list_filter_mark_type: TIMConversationMarkType.kTIMConversationMarkTypeStar,//会话标记类型conversation_list_filter_conversation_group: "groupName"//拉取的群组名};ulong next_seq = 0; // 拉取游标uint count = 10; // 拉取数量//获取会话列表的高级接口TIMResult res = TencentIMSDK.ConvGetConversationListByFilter(filter, next_seq, count, (int code, string desc, ConversationListResult result, string user_data)=>{// 获取会话列表异步结果if (code == 0) {//拉取成功bool isFinished = result.conversation_list_result_is_finished; //是否拉取完next_seq = result.conversation_list_result_next_seq; //后续分页拉取的游标var conversationList = result.conversation_list_result_conv_list; //此次拉取到的消息列表//如果没有拉取完,使用返回的nextSeq继续拉取直到isFinished为true}});
本页内容是否解决了您的问题?