Update a conversation group
Update a conversation group’s name, extension string, or visibility status.
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
| Parameter | Type | Required | Description |
|---|---|---|---|
conversationGroupID | string | Yes | Identifier of the conversation group to modify. |
name | string | No | New display name for the group. |
ex | string | No | New complete application extension string. |
hidden | boolean | No | Whether 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?.conversationGroupReturn 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.
Was this page helpful?