NIMConversationManagerDelegate Protocol Reference
| Conforms to | NSObject | 
|---|---|
| Declared in | NIMConversationManagerProtocol.h | 
– didLoadAllRecentSessionCompletion
	最近会话数据库读取完成
- (void)didLoadAllRecentSessionCompletionDiscussion
最近会话数据库读取完成
所有最近会话读取完成。设置NIMSDKConfig中的asyncLoadRecentSessionEnabled属性为YES时,且本地数目大于1000条时,此回调会执行。 该回调执行表示最近会话全部加载完毕可以通过allRecentSessions来取全部对话。
Declared In
NIMConversationManagerProtocol.h
– didAddRecentSession:totalUnreadCount:
	增加最近会话的回调
- (void)didAddRecentSession:(NIMRecentSession *)recentSession totalUnreadCount:(NSInteger)totalUnreadCountParameters
recentSession | 
						最近会话  | 
					
|---|---|
totalUnreadCount | 
						目前总未读数  | 
					
Discussion
增加最近会话的回调
当新增一条消息,并且本地不存在该消息所属的会话时,会触发此回调。
Declared In
NIMConversationManagerProtocol.h
– didUpdateRecentSession:totalUnreadCount:
	最近会话修改的回调
- (void)didUpdateRecentSession:(NIMRecentSession *)recentSession totalUnreadCount:(NSInteger)totalUnreadCountParameters
recentSession | 
						最近会话  | 
					
|---|---|
totalUnreadCount | 
						目前总未读数  | 
					
Discussion
最近会话修改的回调
触发条件包括: 1.当新增一条消息,并且本地存在该消息所属的会话。 2.所属会话的未读清零。 3.所属会话的最后一条消息的内容发送变化。(例如成功发送后,修正发送时间为服务器时间) 4.删除消息,并且删除的消息为当前会话的最后一条消息。
Declared In
NIMConversationManagerProtocol.h
– didRemoveRecentSession:totalUnreadCount:
	删除最近会话的回调
- (void)didRemoveRecentSession:(NIMRecentSession *)recentSession totalUnreadCount:(NSInteger)totalUnreadCountParameters
recentSession | 
						最近会话  | 
					
|---|---|
totalUnreadCount | 
						目前总未读数  | 
					
Discussion
删除最近会话的回调
Declared In
NIMConversationManagerProtocol.h
– didUpdateUnreadCountDic:
	未读数更新的回调 (markRead不会走此回调)
- (void)didUpdateUnreadCountDic:(NSDictionary *)unreadCountDicParameters
unreadCountDic | 
						各类型未读数的字典: [@(NIMSessionType): @(条数)]  | 
					
|---|
Discussion
未读数更新的回调 (markRead不会走此回调)
Declared In
NIMConversationManagerProtocol.h
– messagesDeletedInSession:
	单个会话里所有消息被删除的回调
- (void)messagesDeletedInSession:(NIMSession *)sessionParameters
session | 
						消息所属会话  | 
					
|---|
Discussion
单个会话里所有消息被删除的回调
Declared In
NIMConversationManagerProtocol.h
– allMessagesDeleted
	所有消息被删除的回调
- (void)allMessagesDeletedDiscussion
所有消息被删除的回调
Declared In
NIMConversationManagerProtocol.h
– allMessagesClearedInSession:step:
	单个会话所有消息在本地和服务端都被清空
- (void)allMessagesClearedInSession:(NIMSession *)session step:(NIMClearMessagesStatus)stepParameters
session | 
						消息所属会话  | 
					
|---|
Discussion
单个会话所有消息在本地和服务端都被清空
Declared In
NIMConversationManagerProtocol.h
– allMessagesRead
	所有消息已读的回调
- (void)allMessagesReadDiscussion
所有消息已读的回调
Declared In
NIMConversationManagerProtocol.h
– messagesReadOfType:
	消息已读的回调
- (void)messagesReadOfType:(NIMSessionType)typeParameters
type | 
						消息所属会话类型  | 
					
|---|
Discussion
消息已读的回调
Declared In
NIMConversationManagerProtocol.h
– didServerSessionUpdated:
	会话服务,会话更新
- (void)didServerSessionUpdated:(nullable NIMRecentSession *)recentSessionParameters
recentSession | 
						最近会话  | 
					
|---|
Discussion
会话服务,会话更新
Declared In
NIMConversationManagerProtocol.h
– onRecvMessageDeleted:ext:
	消息单向删除通知 (Deprecated: 请使用 - onRecvMessagesDeleted: exts:)
- (void)onRecvMessageDeleted:(NIMMessage *)message ext:(nullable NSString *)extParameters
message | 
						被删除消息  | 
					
|---|---|
ext | 
						扩展消息  | 
					
Discussion
消息单向删除通知
Declared In
NIMConversationManagerProtocol.h
– onRecvMessagesDeleted:exts:
	消息单向删除通知
- (void)onRecvMessagesDeleted:(NSArray<NIMMessage*> *)messages exts:(nullable NSDictionary<NSString*,NSString*> *)extsParameters
exts | 
						删除时的扩展字段字典,key: messageId,value: ext  | 
					
|---|---|
message | 
						被删除消息  | 
					
Discussion
消息单向删除通知
Declared In
NIMConversationManagerProtocol.h
– onRecvIncompleteSessionInfos:
	未漫游完整会话列表回调
- (void)onRecvIncompleteSessionInfos:(nullable NSArray<NIMIncompleteSessionInfo*> *)infosParameters
infos | 
						未漫游完整的会话信息  | 
					
|---|
Discussion
未漫游完整会话列表回调
Declared In
NIMConversationManagerProtocol.h
– onMarkMessageReadCompleteInSession:error:
	标记已读回调
- (void)onMarkMessageReadCompleteInSession:(NIMSession *)session error:(nullable NSError *)errorParameters
session | 
						session  | 
					
|---|---|
error | 
						失败原因  | 
					
Discussion
标记已读回调
Declared In
NIMConversationManagerProtocol.h
– onBatchMarkMessagesReadInSessions:
	批量标记已读的回调
- (void)onBatchMarkMessagesReadInSessions:(NSArray<NIMSession*> *)sessionsParameters
session | 
						session  | 
					
|---|
Discussion
批量标记已读的回调
Declared In
NIMConversationManagerProtocol.h
– onRecvAllRemoteMessagesInSessionDeleted:
	远端消息清空的通知
- (void)onRecvAllRemoteMessagesInSessionDeleted:(NIMSessionDeleteAllRemoteMessagesInfo *)infoParameters
info | 
						清空会话的信息  | 
					
|---|
Discussion
远端消息清空的通知
Declared In
NIMConversationManagerProtocol.h