NIMConversationManagerDelegate Protocol Reference
Conforms to | NSObject |
---|---|
Declared in | NIMConversationManagerProtocol.h |
– didLoadAllRecentSessionCompletion
Callback when all recent sessions are fetched from the database
- (void)didLoadAllRecentSessionCompletion
Discussion
Callback when all recent sessions are fetched from the database
All recent sessions are read. This callback will be executed when the asyncLoadRecentSessionEnabled property in NIMSDKConfig is set to YES and the number of local messages is greater than 1000. The execution of this callback indicates that all recent sessions have been loaded, and all recent sessions can be retrieved using allRecentSessions.
Declared In
NIMConversationManagerProtocol.h
– didAddRecentSession:totalUnreadCount:
Callback for adding a recent session
- (void)didAddRecentSession:(NIMRecentSession *)recentSession totalUnreadCount:(NSInteger)totalUnreadCount
Parameters
recentSession |
Recent session |
---|---|
totalUnreadCount |
total unread count |
Discussion
Callback for adding a recent session
If a new message is received and the session for the message does not exist in the local storage, the callback will be triggered.
Declared In
NIMConversationManagerProtocol.h
– didUpdateRecentSession:totalUnreadCount:
Callback for modifying a recent session
- (void)didUpdateRecentSession:(NIMRecentSession *)recentSession totalUnreadCount:(NSInteger)totalUnreadCount
Parameters
recentSession |
Recent session |
---|---|
totalUnreadCount |
total unread count |
Discussion
Callback for modifying a recent session
trigger condition includes: 1 If a new message is received and the session for the message does not exist in the local storage, the callback will be triggered. 2. The unread count of the session is cleared. 3. The content of the last message in the session changes. For example, after the message is sent, rectify the sending time as the server time 4. A message is deleted and the deleted message is the last message of the current session.
Declared In
NIMConversationManagerProtocol.h
– didRemoveRecentSession:totalUnreadCount:
Callback for deleting a recent session
- (void)didRemoveRecentSession:(NIMRecentSession *)recentSession totalUnreadCount:(NSInteger)totalUnreadCount
Parameters
recentSession |
Recent session |
---|---|
totalUnreadCount |
total unread count |
Discussion
Callback for deleting a recent session
Declared In
NIMConversationManagerProtocol.h
– messagesDeletedInSession:
Callback for deleting all messages in a session
- (void)messagesDeletedInSession:(NIMSession *)session
Parameters
session |
session to which the deleted messages belong |
---|
Discussion
Callback for deleting all messages in a session
Declared In
NIMConversationManagerProtocol.h
– allMessagesDeleted
Callback for all messages are deleted
- (void)allMessagesDeleted
Discussion
Callback for all messages are deleted
Declared In
NIMConversationManagerProtocol.h
– allMessagesClearedInSession:step:
All messages in a single session are cleared locally and on the server
- (void)allMessagesClearedInSession:(NIMSession *)session step:(NIMClearMessagesStatus)step
Parameters
session |
session to which the deleted messages belong |
---|
Discussion
All messages in a single session are cleared locally and on the server
Declared In
NIMConversationManagerProtocol.h
– allMessagesRead
Callback for all messages read
- (void)allMessagesRead
Discussion
Callback for all messages read
Declared In
NIMConversationManagerProtocol.h
– didServerSessionUpdated:
Session service, session update
- (void)didServerSessionUpdated:(nullable NIMRecentSession *)recentSession
Parameters
recentSession |
Recent session |
---|
Discussion
Session service, session update
Declared In
NIMConversationManagerProtocol.h
– onRecvMessageDeleted:ext:
notification for one-way deleting a message (Deprecated: use - onRecvMessagesDeleted: exts:)
- (void)onRecvMessageDeleted:(NIMMessage *)message ext:(nullable NSString *)ext
Parameters
message |
a message to be deleted |
---|---|
ext |
extension message |
Discussion
notification for one-way deleting a message
Declared In
NIMConversationManagerProtocol.h
– onRecvMessagesDeleted:exts:
notification for one-way deleting a message
- (void)onRecvMessagesDeleted:(NSArray<NIMMessage*> *)messages exts:(nullable NSDictionary<NSString*,NSString*> *)exts
Parameters
exts |
dictionary of the extension field, key: messageId, value: ext |
---|---|
message |
a message to be deleted |
Discussion
notification for one-way deleting a message
Declared In
NIMConversationManagerProtocol.h
– onRecvIncompleteSessionInfos:
Callback for the complete session that are not roaming
- (void)onRecvIncompleteSessionInfos:(nullable NSArray<NIMIncompleteSessionInfo*> *)infos
Parameters
infos |
the complete session that are not roaming |
---|
Discussion
Callback for the complete session that are not roaming
Declared In
NIMConversationManagerProtocol.h
– onMarkMessageReadCompleteInSession:error:
Mark as read
- (void)onMarkMessageReadCompleteInSession:(NIMSession *)session error:(nullable NSError *)error
Parameters
session |
session |
---|---|
error |
failure reason |
Discussion
Mark as read
Declared In
NIMConversationManagerProtocol.h
– onBatchMarkMessagesReadInSessions:
Mark messages as read in multiple sessions
- (void)onBatchMarkMessagesReadInSessions:(NSArray<NIMSession*> *)sessions
Parameters
session |
session |
---|
Discussion
Mark messages as read in multiple sessions
Declared In
NIMConversationManagerProtocol.h
– onRecvAllRemoteMessagesInSessionDeleted:
Notification of remote message clearing
- (void)onRecvAllRemoteMessagesInSessionDeleted:(NIMSessionDeleteAllRemoteMessagesInfo *)info
Parameters
info |
Clearing sessions info |
---|
Discussion
Notification of remote message clearing
Declared In
NIMConversationManagerProtocol.h