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

Quit a group

Leave a group in which the authenticated user is currently a member.

Copy

Invoke quitGroup() to leave an active group as a regular member or administrator. The group owner cannot leave the group directly; they must transfer ownership to another member using Transfer group ownership before exiting.

Parameters

ParameterTypeRequiredDescription
groupIDstringYesThe ID of the group to leave.

Code example

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

await quitGroup(groupID)

Return value

The Promise resolves with void once OpenIMServer processes the departure request.

State changes after the call

A resolved Promise confirms that the exit request completed. The client removes the group from its joined group list using groupID, confirming removal when onJoinedGroupDeleted arrives. For complete group event listener registration, see Group overview.

Leaving a group does not automatically delete or hide local conversation records. The conversation entry may remain in the history list; do not infer active group membership from conversation existence alone.