From fd3b65b5be2950e550e1e18a8d29451bdd66ce7f Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Thu, 14 Feb 2019 15:56:07 +0100 Subject: [PATCH] Add missing method to Echo instance The leaveChannel was missing from the Echo instance and thus the feature wasn't available as described in the docs. --- src/echo.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/echo.ts b/src/echo.ts index 6777ea0f..61bc84a9 100644 --- a/src/echo.ts +++ b/src/echo.ts @@ -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. */