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

Update a conversation group

Update a conversation group’s name, extension string, or visibility status.

Copy

Updating conversation groups is a Commercial Edition capability. Supply conversationGroupID along with only the specific fields you wish to modify. At least one updatable property must be provided in addition to the identifier.

Parameters

ParameterTypeRequiredDescription
conversationGroupIDstringYesIdentifier of the conversation group to modify.
namestringNoNew display name for the group.
exstringNoNew complete application extension string.
hiddenbooleanNoWhether to hide this conversation group tab from display.

Code example

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

const result = await updateConversationGroup({
  conversationGroupID,
  name: 'Priority Work',
  hidden: false,
})
const updatedGroup = result?.conversationGroup

Return value

The Promise resolves with an OpenIMUpdateConversationGroupResult | null object. The updated group object is contained in conversationGroup (OpenIMConversationGroupItem).

State changes after the call

Promise resolution indicates that the group was modified. Merge the updated properties into local UI state using conversationGroupID as the key. When onConversationGroupChanged arrives or after reconnecting, re-query the group list as described in Conversation group overview.