Browse SDKs · uni-app / uni-app x
Platform
SDKsuni-app / uni-app xEnterprise

Mark a conversation

Set or clear the commercial marked tag on a conversation for the authenticated user.

Copy

Marking conversations is a Commercial Edition capability. The isMarked property alters the marked indicator exclusively for the currently authenticated user. When marked, the conversation is automatically included in the built-in marked group; when unmarked, it is automatically removed without requiring explicit conversation group member management API calls.

Parameters

ParameterTypeRequiredDescription
conversationIDstringYesIdentifier of the target conversation.
isMarkedbooleanYesSet to true to mark the conversation, or false to remove the mark.

Code example

import { setConversation } from '@/uni_modules/unix-openim-sdk'

await setConversation({
  conversationID,
  isMarked: true,
})

The marked status operates independently from the pinned status and does not modify group profiles or chat message content. For details on conversation group architectures, see Conversation group overview.

Return value

The Promise resolves with void upon successful completion.

State changes after the call

Promise resolution indicates that the SDK updated local storage and dispatched the request to the server. You can immediately reflect the updated isMarked value in your local UI state. The SDK then delivers onConversationChanged, where you can verify the persisted state using conversationID as the primary key. If state verification is required, re-query the conversation record as described in Retrieve conversation list.