Skip to content

Commit 6840250

Browse files
author
Fil Maj
authored
Publish @slack/[email protected] (#1785)
1 parent 476e6a9 commit 6840250

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

packages/socket-mode/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@slack/socket-mode",
3-
"version": "2.0.0-rc.2",
3+
"version": "2.0.0",
44
"description": "Official library for using the Slack Platform's Socket Mode API",
55
"author": "Slack Technologies, LLC",
66
"license": "MIT",

packages/socket-mode/src/SlackWebSocket.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,8 @@ export class SlackWebSocket { // python equiv: Connection
184184
}
185185

186186
/**
187-
* Returns true if the underlying WebSocket connection is active.
187+
* Returns true if the underlying WebSocket connection is active, meaning the underlying
188+
* {@link https://github.com/websockets/ws/blob/master/doc/ws.md#ready-state-constants WebSocket ready state is "OPEN"}.
188189
*/
189190
public isActive(): boolean { // python equiv: SocketModeClient.is_connected
190191
if (!this.websocket) {
@@ -198,6 +199,7 @@ export class SlackWebSocket { // python equiv: Connection
198199
/**
199200
* Retrieve the underlying WebSocket readyState. Returns `undefined` if the WebSocket has not been instantiated,
200201
* otherwise will return a number between 0 and 3 inclusive representing the ready states.
202+
* 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 }
201203
*/
202204
public get readyState(): number | undefined {
203205
return this.websocket?.readyState;

packages/socket-mode/test/integration.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ describe('Integration tests with a WebSocket server', () => {
245245
});
246246
describe('related to ping/pong events', () => {
247247
beforeEach(() => {
248-
client = new SocketModeClient({ appToken: 'whatever', logLevel: LogLevel.DEBUG, clientOptions: {
248+
client = new SocketModeClient({ appToken: 'whatever', logLevel: LogLevel.ERROR, clientOptions: {
249249
slackApiUrl: `http://localhost:${HTTP_PORT}/`
250250
}, clientPingTimeout: 25, serverPingTimeout: 25, pingPongLoggingEnabled: false });
251251
});

0 commit comments

Comments
 (0)