groups.leave()
Leave a group or a forum. Also removes the roster entry, similar to conversations.remove().
Definition
client.groups.leave(id: string|Group):Promise<void,Error>
Parameters
| Parameter | Type | Description |
|---|---|---|
id | string|Group | The group ID or group model |
Returns
An error will be thrown if the delete operation failed, otherwise the Promise will resolve.
Example
await client.groups.leave('some-group-id');console.log('left group');