SDKsHarmonyOSEnterprise
Remove conversations from groups
Remove one or more conversations from designated conversation groups.
This method unlinks conversations from conversation groups; it does not delete the conversations or clear chat history.
Code example
import sdk, { RemoveConversationsFromGroupsReq } from '@openimsdk/imsdk';
const request: RemoveConversationsFromGroupsReq = {
conversationIDs: [conversationID],
conversationGroupIDs: [conversationGroupID],
};
await sdk.removeConversationsFromGroups(request);Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
conversationIDs | string[] | Yes | List of conversation IDs to unlink. |
conversationGroupIDs | string[] | Yes | Target conversation group IDs. |
Return value
Returns a Promise that resolves to void when the dissociation request completes.
State changes after the call
Resolving the Promise confirms that the unlinking instruction succeeded on the server. Update local state incrementally when receiving EventOnConversationGroupMemberDeleted, correlating by conversationGroupID and conversationID. For detailed event patterns, see Conversation groups overview. Re-query affected groups to calibrate state when necessary.
Was this page helpful?