Skip to main content

markConversationMessageAsRead

Feature Introduction

Description

Mark the conversation as read.

  1. If the conversation type is a one-on-one chat, this interface is used to eliminate unread counts and send the read receipt for one-on-one chats. After calling this interface, the read status of messages sent by the other party will be updated.
  2. If the conversation type is a group chat, this interface is only used to eliminate unread counts.
  3. If the conversation type is a notification, this interface is only used to eliminate unread counts.

Function Prototype


- (void)markConversationMessageAsRead:(NSString *)conversationID
onSuccess:(nullable OIMSuccessCallback)onSuccess
onFailure:(nullable OIMFailureCallback)onFailure;

Input Parameters

Parameter NameParameter TypeRequiredDescription
conversationIDNSStringYesConversation ID

Return Result

NameTypeDescription
onSuccessOIMSuccessCallbackSuccess return
onFailureOIMFailureCallbackFailure return

Code Example


[OIMManager.manager markConversationMessageAsRead:@""
onSuccess:^(NSString * _Nullable data) {

} onFailure:^(NSInteger code, NSString * _Nullable msg) {

}];