From bf6e1155c557cd2759d0115a8eef07787e16503d Mon Sep 17 00:00:00 2001 From: shpuld Date: Mon, 17 Jun 2019 22:45:23 +0300 Subject: [PATCH] uncomment the ws stuff --- src/modules/api.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/modules/api.js b/src/modules/api.js index 781cd57c..d51b31f3 100644 --- a/src/modules/api.js +++ b/src/modules/api.js @@ -1,5 +1,5 @@ import backendInteractorService from '../services/backend_interactor_service/backend_interactor_service.js' -// import { Socket } from 'phoenix' +import { Socket } from 'phoenix' const api = { state: { @@ -58,10 +58,10 @@ const api = { initializeSocket (store) { // Set up websocket connection if (!store.state.chatDisabled) { - // const token = store.state.wsToken - // const socket = new Socket('/socket', {params: {token}}) - // socket.connect() - // store.dispatch('initializeChat', socket) + const token = store.state.wsToken + const socket = new Socket('/socket', { params: { token } }) + socket.connect() + store.dispatch('initializeChat', socket) } }, disableChat (store) {