diff options
author | Thibaut Girka <thib@sitedethib.com> | 2018-05-27 19:10:37 +0200 |
---|---|---|
committer | ThibG <thib@sitedethib.com> | 2018-05-29 21:25:28 +0200 |
commit | 0ad3eedd4cf6d1d7f7ceacc2c4412dbd8ee79cef (patch) | |
tree | 9ce0301ec860e4ca5c3cf3ef2a03bcc471aa7e94 /app/javascript/flavours/glitch/util | |
parent | 532fb8e2150c70c627d57f9f72f8232606976a4a (diff) |
[Glitch] Allow clients to fetch statuses made while they were offline
Port 9a1a55ce526c956ac6b35897d483c316b7ad4394 to glitch-soc
Diffstat (limited to 'app/javascript/flavours/glitch/util')
-rw-r--r-- | app/javascript/flavours/glitch/util/stream.js | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/app/javascript/flavours/glitch/util/stream.js b/app/javascript/flavours/glitch/util/stream.js index 9a6f4f26d..6c67ba275 100644 --- a/app/javascript/flavours/glitch/util/stream.js +++ b/app/javascript/flavours/glitch/util/stream.js @@ -1,10 +1,10 @@ import WebSocketClient from 'websocket.js'; -export function connectStream(path, pollingRefresh = null, callbacks = () => ({ onConnect() {}, onDisconnect() {}, onReceive() {} })) { +export function connectStream(path, pollingRefresh = null, callbacks = () => ({ onDisconnect() {}, onReceive() {} })) { return (dispatch, getState) => { const streamingAPIBaseURL = getState().getIn(['meta', 'streaming_api_base_url']); const accessToken = getState().getIn(['meta', 'access_token']); - const { onConnect, onDisconnect, onReceive } = callbacks(dispatch, getState); + const { onDisconnect, onReceive } = callbacks(dispatch, getState); let polling = null; const setupPolling = () => { @@ -25,7 +25,6 @@ export function connectStream(path, pollingRefresh = null, callbacks = () => ({ if (pollingRefresh) { clearPolling(); } - onConnect(); }, disconnected () { @@ -44,7 +43,6 @@ export function connectStream(path, pollingRefresh = null, callbacks = () => ({ clearPolling(); pollingRefresh(dispatch); } - onConnect(); }, }); |