Add conversations to groups
Assign one or more conversations to one or more conversation groups.
Managing conversation group membership is a Commercial Edition capability. This operation creates an association between the specified conversation IDs and group IDs; it does not generate new conversations or alter chat targets.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
conversationIDs | string[] | Yes | Array of OpenIM conversation identifiers to assign. |
conversationGroupIDs | string[] | Yes | Array of target conversation group identifiers. |
Code example
import { addConversationsToGroups } from '@/uni_modules/unix-openim-sdk'
await addConversationsToGroups({
conversationIDs: [conversationID],
conversationGroupIDs: [conversationGroupID],
})Return value
The Promise resolves with void upon successful completion.
State changes after the call
Promise resolution indicates that the association request succeeded. You can immediately reflect the new group assignment in local UI mappings using conversationGroupID and conversationID. Promise resolution does not guarantee that member change events have reached all client devices. When member update events arrive, re-query the affected groups as detailed in Conversation group overview.
Was this page helpful?