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

Add conversations to groups

Assign one or more conversations to one or more conversation groups.

Copy

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

ParameterTypeRequiredDescription
conversationIDsstring[]YesArray of OpenIM conversation identifiers to assign.
conversationGroupIDsstring[]YesArray 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.