Skip to main content
// Transfer group ownership
await CometChat.transferGroupOwnership("GUID", "NEW_OWNER_UID");
Note: Only the current group owner can transfer ownership. The owner must transfer ownership before leaving the group.
Only the owner of a Group can transfer ownership. Since owners cannot leave their group, you must transfer ownership first if you want to leave. Use transferGroupOwnership() to transfer ownership to another member.
let GUID = "GUID";
let UID = "UID";
CometChat.transferGroupOwnership(GUID, UID).then(
  () => {
      console.log("Successfully transferred ownership of the group.");
  }, error => {
      console.log("Could not transfer ownership of the group: ", error);
  }
)
On success, the method resolves with a success message string confirming the operation.

Next Steps

Leave Group

Leave a group after transferring ownership

Change Member Scope

Promote or demote group members