diff --git a/packages/socket-mode/package.json b/packages/socket-mode/package.json index 0e77494c5..244252374 100644 --- a/packages/socket-mode/package.json +++ b/packages/socket-mode/package.json @@ -1,6 +1,6 @@ { "name": "@slack/socket-mode", - "version": "2.0.0-rc.2", + "version": "2.0.0", "description": "Official library for using the Slack Platform's Socket Mode API", "author": "Slack Technologies, LLC", "license": "MIT", diff --git a/packages/socket-mode/src/SlackWebSocket.ts b/packages/socket-mode/src/SlackWebSocket.ts index 1cb3b5cb1..026714948 100644 --- a/packages/socket-mode/src/SlackWebSocket.ts +++ b/packages/socket-mode/src/SlackWebSocket.ts @@ -184,7 +184,8 @@ export class SlackWebSocket { // python equiv: Connection } /** - * Returns true if the underlying WebSocket connection is active. + * Returns true if the underlying WebSocket connection is active, meaning the underlying + * {@link https://github.com/websockets/ws/blob/master/doc/ws.md#ready-state-constants WebSocket ready state is "OPEN"}. */ public isActive(): boolean { // python equiv: SocketModeClient.is_connected if (!this.websocket) { @@ -198,6 +199,7 @@ export class SlackWebSocket { // python equiv: Connection /** * Retrieve the underlying WebSocket readyState. Returns `undefined` if the WebSocket has not been instantiated, * otherwise will return a number between 0 and 3 inclusive representing the ready states. + * The ready state constants are documented in the {@link https://github.com/websockets/ws/blob/master/doc/ws.md#ready-state-constants `ws` API docs } */ public get readyState(): number | undefined { return this.websocket?.readyState; diff --git a/packages/socket-mode/test/integration.spec.js b/packages/socket-mode/test/integration.spec.js index 5cbe10f96..a7b2d6aef 100644 --- a/packages/socket-mode/test/integration.spec.js +++ b/packages/socket-mode/test/integration.spec.js @@ -245,7 +245,7 @@ describe('Integration tests with a WebSocket server', () => { }); describe('related to ping/pong events', () => { beforeEach(() => { - client = new SocketModeClient({ appToken: 'whatever', logLevel: LogLevel.DEBUG, clientOptions: { + client = new SocketModeClient({ appToken: 'whatever', logLevel: LogLevel.ERROR, clientOptions: { slackApiUrl: `http://localhost:${HTTP_PORT}/` }, clientPingTimeout: 25, serverPingTimeout: 25, pingPongLoggingEnabled: false }); });