Skip to main content

Pin Conversation

Set Conversation to Top

Call setConversationToTop to set a conversation to the top.

const conversationType = RongIMLib.ConversationType.PRIVATE;
const targetId = 'Receiver's userId';
const isTop = true

RongIMLib.setConversationToTop({
conversationType,
targetId,
}, isTop).then(({code}) => {
// Successfully set conversation to top
if( !code ){
}
})
ParameterTypeRequiredDescription
targetIdStringYesReceiver's userId
conversationTypeNumberYesConversation type, refer to ConversationType.
isTopBooleanNoWhether to set to top