Skip to content

Commit

Permalink
Publish @slack/[email protected] (#1785)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fil Maj authored Apr 30, 2024
1 parent 476e6a9 commit 6840250
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/socket-mode/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
4 changes: 3 additions & 1 deletion packages/socket-mode/src/SlackWebSocket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion packages/socket-mode/test/integration.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
});
Expand Down

0 comments on commit 6840250

Please sign in to comment.