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

Set a conversation remark

Set a custom conversation-level alias remark for the authenticated user.

Copy

Setting a conversation remark is a Commercial Edition capability. The remark is a client-side alias maintained exclusively by the currently authenticated user for this conversation session; it does not change the peer's actual nickname, friend remark, or group name.

Parameters

ParameterTypeRequiredDescription
conversationIDstringYesIdentifier of the target conversation.
remarkstringYesCustom remark string; pass an empty string "" to clear the remark.

Code example

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

await setConversation({
  conversationID,
  remark: 'Project Discussion',
})

When rendering the conversation title in the UI, choose between remark and the conversation's default showName according to your application design rules. Never persist conversation remarks back to user profiles, friend records, or group metadata.

Return value

The Promise resolves with void upon successful completion.

State changes after the call

Promise resolution indicates that the SDK persisted the remark locally and synchronized it with the server. You can immediately update the remark property of the target conversation in local memory. The SDK subsequently emits 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.