Browse SDKs · HarmonyOS
Platform
SDKsHarmonyOSEnterprise

Dismiss group

Disband and permanently dismiss a group by its owner.

Copy

Only the group owner possesses authority to disband a group. Dismissing a group terminates the community for all members, differing fundamentally from deleting or hiding a personal conversation:

Code example

import sdk, { DismissGroupReq } from '@openimsdk/imsdk';

const request: DismissGroupReq = { groupID: groupID };
await sdk.dismissGroup(request);

Parameters

ParameterTypeRequiredDescription
groupIDstringYesTarget group identifier to disband.

Return value

Returns a Promise that resolves to void upon group dissolution.

State changes after the call

Resolving the Promise completes the dissolution request. When EventOnGroupDismissed arrives across connected devices, mark the group as dismissed keyed by groupID and disable message sending and management inputs, as described in Group overview. Dissolution events should not forcibly purge local conversation records without user consent.