about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2019-05-24 16:30:49 +0200
committerGitHub <noreply@github.com>2019-05-24 16:30:49 +0200
commitfd0487c04fbcbc89fb351b156999a6dc3a99d68b (patch)
treee4d2533bdb3ff0e3a6a30b26eb1268a312ddb4f3 /app/javascript/flavours/glitch
parent72bf354e979a9b8c14c41bf34c47060d5ff4d232 (diff)
parent7fb76999af8a14bb1761eebcf23b65f51067054f (diff)
Merge pull request #1068 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/javascript/flavours/glitch')
-rw-r--r--app/javascript/flavours/glitch/util/stream.js6
1 files changed, 1 insertions, 5 deletions
diff --git a/app/javascript/flavours/glitch/util/stream.js b/app/javascript/flavours/glitch/util/stream.js
index 306a068b7..c4642344f 100644
--- a/app/javascript/flavours/glitch/util/stream.js
+++ b/app/javascript/flavours/glitch/util/stream.js
@@ -71,11 +71,7 @@ export function connectStream(path, pollingRefresh = null, callbacks = () => ({
 export default function getStream(streamingAPIBaseURL, accessToken, stream, { connected, received, disconnected, reconnected }) {
   const params = [ `stream=${stream}` ];
 
-  if (accessToken !== null) {
-    params.push(`access_token=${accessToken}`);
-  }
-
-  const ws = new WebSocketClient(`${streamingAPIBaseURL}/api/v1/streaming/?${params.join('&')}`);
+  const ws = new WebSocketClient(`${streamingAPIBaseURL}/api/v1/streaming/?${params.join('&')}`, accessToken);
 
   ws.onopen      = connected;
   ws.onmessage   = e => received(JSON.parse(e.data));