diff --git a/src/connector/connector.ts b/src/connector/connector.ts index 3cc3b224..0e5beff6 100644 --- a/src/connector/connector.ts +++ b/src/connector/connector.ts @@ -81,14 +81,14 @@ export abstract class Connector { abstract presenceChannel(channel: string): PresenceChannel; /** - * Leave the given channel and its private & presence channels. + * Leave the given channel, as well as its private and presence variants. */ abstract leave(channel: string): void; /** * Leave the given channel. */ - abstract leaveOne(channel: string): void; + abstract leaveChannel(channel: string): void; /** * Get the socket_id of the connection. diff --git a/src/connector/null-connector.ts b/src/connector/null-connector.ts index 743a8f82..3d5d3cf5 100644 --- a/src/connector/null-connector.ts +++ b/src/connector/null-connector.ts @@ -48,7 +48,7 @@ export class NullConnector extends Connector { } /** - * Leave the given channel and its private & presence channels. + * Leave the given channel, as well as its private and presence variants. */ leave(name: string): void { // @@ -57,7 +57,7 @@ export class NullConnector extends Connector { /** * Leave the given channel. */ - leaveOne(name: string): void { + leaveChannel(name: string): void { // } diff --git a/src/connector/pusher-connector.ts b/src/connector/pusher-connector.ts index 6ca0cabf..3d89dbf9 100644 --- a/src/connector/pusher-connector.ts +++ b/src/connector/pusher-connector.ts @@ -81,20 +81,20 @@ export class PusherConnector extends Connector { } /** - * Leave the given channel and its private & presence channels. + * Leave the given channel, as well as its private and presence variants. */ leave(name: string): void { let channels = [name, 'private-' + name, 'presence-' + name]; channels.forEach((name: string, index: number) => { - this.leaveOne(name); + this.leaveChannel(name); }); } /** * Leave the given channel. */ - leaveOne(name: string): void { + leaveChannel(name: string): void { if (this.channels[name]) { this.channels[name].unsubscribe(); diff --git a/src/connector/socketio-connector.ts b/src/connector/socketio-connector.ts index 965030df..8712b28d 100644 --- a/src/connector/socketio-connector.ts +++ b/src/connector/socketio-connector.ts @@ -94,20 +94,20 @@ export class SocketIoConnector extends Connector { } /** - * Leave the given channel and its private & presence channels. + * Leave the given channel, as well as its private and presence variants. */ leave(name: string): void { let channels = [name, 'private-' + name, 'presence-' + name]; channels.forEach(name => { - this.leaveOne(name); + this.leaveChannel(name); }); } /** * Leave the given channel. */ - leaveOne(name: string): void { + leaveChannel(name: string): void { if (this.channels[name]) { this.channels[name].unsubscribe();