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

Dismiss a group

OpenIM uni-app / uni-app x SDK guide for Dismiss a group.

Copy

dismissGroup() permanently dismisses one group. Only an authorized owner can perform this high-risk operation.

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

await dismissGroup(groupID)

Ask for explicit confirmation and show the group name and member impact. Prevent duplicate taps. The server validates ownership and current group state; local ownerUserID is not sufficient authorization.

Promise success means that the dismiss request completed, not that every client processed the event. Wait for onGroupDismissed / onJoinedGroupDeleted or requery, then remove group, member, and chat-entry state by groupID. Close the chat and management UI and stop sending group messages. Preserve current state when the Promise fails.