Use this file to discover all available pages before exploring further.
AI Integration Quick Reference
// Transfer group ownershipawait CometChat.transferGroupOwnership("GUID", "NEW_OWNER_UID");
Note: Only the current group owner can transfer ownership. The owner must transfer ownership before leaving the group.
Transfer ownership of a group to another member. Only the current owner can do this, and since owners cannot leave their group, you must transfer ownership first if you want to leave. See Leave Group.
Use transferGroupOwnership() to transfer ownership to another group member.
TypeScript
JavaScript
let GUID: string = "GUID";let UID: string = "UID";CometChat.transferGroupOwnership(GUID, UID).then( (ownershipTransferred: string) => { console.log("Successfully transferred ownership of the group."); }, error => { console.log("Could not transfer ownership of the group: ", error); });
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); })
Parameter
Description
GUID
The GUID of the group
UID
The UID of the member to become the new owner
On success, the method resolves with a success message string confirming the operation. The new owner gets admin scope and the previous owner becomes a participant.