Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Dec 12, 2018
1 parent 1ac5116 commit 9809405
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/connector/connector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/connector/null-connector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
//
Expand All @@ -57,7 +57,7 @@ export class NullConnector extends Connector {
/**
* Leave the given channel.
*/
leaveOne(name: string): void {
leaveChannel(name: string): void {
//
}

Expand Down
6 changes: 3 additions & 3 deletions src/connector/pusher-connector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
6 changes: 3 additions & 3 deletions src/connector/socketio-connector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit 9809405

Please sign in to comment.