Skip to content

Commit

Permalink
Add missing method to Echo instance
Browse files Browse the repository at this point in the history
The leaveChannel was missing from the Echo instance and thus the feature wasn't available as described in the docs.
  • Loading branch information
driesvints committed Feb 14, 2019
1 parent 6743c57 commit fd3b65b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/echo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,19 @@ export default class Echo {
}

/**
* Leave the given channel.
* Leave the given channel, as well as its private and presence variants.
*/
leave(channel: string): void {
this.connector.leave(channel);
}

/**
* Leave the given channel.
*/
leaveChannel(channel: string): void {
this.connector.leaveChannel(channel);
}

/**
* Listen for an event on a channel instance.
*/
Expand Down

0 comments on commit fd3b65b

Please sign in to comment.