协同sdk说明


密聊

<h3>密聊</h3> <p>针对QDSession的 SessionType为QDSessionTypeMiLiao类型的密聊消息,我们在这里特别说明,希望帮助客户实现单对单的私密聊天,自动销毁已读的消息,消息的本身和普通消息没有区别,区别就是会话类型</p> <pre><code>@protocol QDConversationManagerDelegate &lt;NSObject&gt; #pragma mark -- MiLiao /** * 增加最近会话的回调 * * @param recentSession 最近会话 * @param totalUnreadCount 目前总未读数 * @discussion 当新增一条消息,并且本地不存在该消息所属的会话时,会触发此回调。 */ - (void)didAddMiLiaoRecentSession:(QDRecentSession *)recentSession totalUnreadCount:(NSInteger)totalUnreadCount; /** * 最近会话修改的回调 * * @param recentSession 最近会话 * @param totalUnreadCount 目前总未读数 * @discussion 触发条件包括: 1.当新增一条消息,并且本地存在该消息所属的会话。 * 2.所属会话的未读清零。 * 3.所属会话的最后一条消息的内容发送变化。(例如成功发送后,修正发送时间为服务器时间) * 4.删除消息,并且删除的消息为当前会话的最后一条消息。 */ - (void)didUpdateMiLiaoRecentSession:(QDRecentSession *)recentSession totalUnreadCount:(NSInteger)totalUnreadCount; /** * 删除最近会话的回调 * * @param recentSession 最近会话 * @param totalUnreadCount 目前总未读数 */ - (void)didRemoveMiLiaoRecentSession:(QDRecentSession *)recentSession totalUnreadCount:(NSInteger)totalUnreadCount; @end</code></pre> <pre><code>@protocol QDIMChatManager &lt;NSObject&gt; /** * 删除过期的密聊消息 * * @param opendate 对方已读时间 */ - (void)delMiLiaoMsgBeforeOfNow:(NSTimeInterval)opendate; /** * 获取所有密聊未读数 */ - (NSInteger)allMiLiaoUnreadCount; /** * 获取所有需要通知/不需要通知的最近密聊未读数 * @param notify 是否需要通知 * @return 未读数 */ - (NSInteger)allMiLiaoUnreadCount:(BOOL)notify; @end </code></pre>

页面列表

ITEM_HTML