Skip to main content

markConversationMessageAsRead

Description

info

Mark a conversation as read.

  1. If the conversation type is single chat, this API is used to clear unread counts and send read receipts. After calling this API, the read status of messages sent by the counterparty will be updated.
  2. If the conversation type is group chat or notification, this API is only used to clear 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) {

}];