Skip to main content

Leave a Group

Use leaveGroup() to stop receiving updates and messages for a group.
Once a group is left, the user will no longer receive any updates or messages pertaining to the group.

Real-Time Group Member Left Events

When a user leaves a group, members receive a real-time event in onGroupMemberLeft() of the GroupListener class. The callback provides an Action object, the left User, and the Group.

Missed Group Member Left Events

When fetching message history, if a member left a group the logged-in user is part of, the list will contain an Action message with these fields:
  1. action - left
  2. actionBy - User object containing the details of the user who left the group
  3. actionFor - Group object containing the details of the group the user has left
Always remove group listeners when they’re no longer needed (e.g., in onDestroy() or when navigating away). Failing to remove listeners can cause memory leaks and duplicate event handling.

Next Steps

Join Group

Rejoin groups or join new ones

Delete Group

Permanently delete groups you own

Retrieve Groups

Fetch list of available groups

Group Listeners

Handle real-time group events