diff options
Diffstat (limited to 'src/web/app/common/scripts/stream.ls')
| -rw-r--r-- | src/web/app/common/scripts/stream.ls | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/web/app/common/scripts/stream.ls b/src/web/app/common/scripts/stream.ls index 534048248f..64ae03817a 100644 --- a/src/web/app/common/scripts/stream.ls +++ b/src/web/app/common/scripts/stream.ls @@ -9,13 +9,12 @@ module.exports = (me) ~> state-ev = riot.observable! event = riot.observable! - socket = new ReconnectingWebSocket CONFIG.api.url.replace \http \ws + host = CONFIG.api.url.replace \http \ws + socket = new ReconnectingWebSocket "#{host}?i=#{me.token}" socket.onopen = ~> state := \connected state-ev.trigger \connected - socket.send JSON.stringify do - i: me.token socket.onclose = ~> state := \reconnecting |