Skip to content

Commit

Permalink
fixing regression for https protocol (untested, keeping fingers crossed)
Browse files Browse the repository at this point in the history
  • Loading branch information
yGuy committed Apr 16, 2023
1 parent 558f6ca commit 0e6c98d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "chatgpt-mattermost-bot",
"version": "1.3.3",
"version": "1.3.4",
"private": true,
"scripts": {
"start": "node ./src/botservice.js"
Expand Down
2 changes: 1 addition & 1 deletion src/mm-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ client.setToken(mattermostToken)

const wsClient = new WebSocketClient();
const wsUrl = new URL(client.getWebSocketUrl());
wsUrl.protocol = wsUrl.protocol === 'https' ? 'wss' : 'ws'
wsUrl.protocol = wsUrl.protocol === 'https:' ? 'wss' : 'ws'

new Promise((resolve, reject) => {
wsClient.addCloseListener(connectFailCount => reject())
Expand Down

0 comments on commit 0e6c98d

Please sign in to comment.