summaryrefslogtreecommitdiff
path: root/src/web/app/common/scripts/stream.ls
diff options
context:
space:
mode:
Diffstat (limited to 'src/web/app/common/scripts/stream.ls')
-rw-r--r--src/web/app/common/scripts/stream.ls5
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