diff options
| author | slice <ryaneft@gmail.com> | 2019-03-10 11:23:27 -0700 |
|---|---|---|
| committer | slice <ryaneft@gmail.com> | 2019-03-10 11:25:36 -0700 |
| commit | e618c6ffb0b974156b89f3e54737e738e94b12b3 (patch) | |
| tree | 5197a0bc55ac81cad80e05686bb664c644da9109 /src/modules/api.js | |
| parent | a67881b096dc4e49db804b7267c3bf49ff78bca6 (diff) | |
Only connect to chat when authenticating in the first place
To avoid duplication of the connection, the chat socket is destroyed
upon logging out.
Diffstat (limited to 'src/modules/api.js')
| -rw-r--r-- | src/modules/api.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/api.js b/src/modules/api.js index dc5278f8..31cb55c6 100644 --- a/src/modules/api.js +++ b/src/modules/api.js @@ -50,7 +50,7 @@ const api = { }, initializeSocket (store) { // Set up websocket connection - if (!store.state.chatDisabled && store.state.wsToken) { + if (!store.state.chatDisabled) { const token = store.state.wsToken const socket = new Socket('/socket', {params: {token}}) socket.connect() |
