Browse SDKs · iOS
SDKsiOSEnterprise

Periodically delete server-side messages

Enable or disable periodic server-side message deletion for a conversation with OpenIM iOS SDK.

Copy
[[OIMManager manager] setConversationIsMsgDestruct:conversationID
                                     isMsgDestruct:YES
                                         onSuccess:nil
                                         onFailure:nil];

This switch controls whether the conversation's server-side messages are deleted periodically; it does not enable burn after reading in a private chat. Set the deletion period through the separate method, and track the results of the switch and period requests independently. After success, merge the state through onConversationChanged:.