Browse SDKs · iOS
SDKsiOSEnterprise

Pin or unpin a message

Pin or unpin a message with OpenIM iOS SDK.

Copy
[[OIMManager manager] setConversationPinnedMsgWithConversationID:conversationID
    clientMsgID:message.clientMsgID
    pinned:YES
    onSuccess:nil
    onFailure:nil];

Pass NO to unpin the message. A successful callback does not return a new list or mean that the event has arrived. This page owns onChangedPinnedMsg:. Replace the collection identified by OIMChangedPinnedMsg.conversationID, then deduplicate its msg items by clientMsgID. For the listener lifecycle, see Receive messages.