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

Remove conversations from groups

Disassociate one or more conversations from one or more conversation groups.

Copy

Removing conversations from groups is a Commercial Edition capability. This operation deletes the association between the specified conversation IDs and group IDs; it does not delete conversations or clear messages.

Parameters

ParameterTypeRequiredDescription
conversationIDsstring[]YesArray of OpenIM conversation identifiers to remove.
conversationGroupIDsstring[]YesArray of target conversation group identifiers.

Code example

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

await removeConversationsFromGroups({
  conversationIDs: [conversationID],
  conversationGroupIDs: [conversationGroupID],
})

Return value

The Promise resolves with void upon successful completion.

State changes after the call

Promise resolution indicates that the disassociation request was processed. You can immediately remove the conversation mapping from local UI state using conversationGroupID and conversationID. When group member update events arrive on this or other connected clients, re-query the affected groups as shown in Conversation group overview.