From 0dfba0884e8885cf242010e0d9da6b328b3560a6 Mon Sep 17 00:00:00 2001 From: Ben Lubar Date: Fri, 24 Jan 2020 13:51:33 -0600 Subject: minor server-sent events fixes (#12945) * Send output on the server-sent events stream immediately so the client sees that it was successfully opened even if it doesn't have any messages. Fix transparent SSE streaming for the public:local and hashtag:local stream types. * Tell caches to never store server-sent events. --- app/javascript/mastodon/stream.js | 1 + 1 file changed, 1 insertion(+) (limited to 'app/javascript') diff --git a/app/javascript/mastodon/stream.js b/app/javascript/mastodon/stream.js index fe965bcb0..0cb2b228f 100644 --- a/app/javascript/mastodon/stream.js +++ b/app/javascript/mastodon/stream.js @@ -92,6 +92,7 @@ export default function getStream(streamingAPIBaseURL, accessToken, stream, { co return ws; } + stream = stream.replace(/:/g, '/'); params.push(`access_token=${accessToken}`); const es = new EventSource(`${streamingAPIBaseURL}/api/v1/streaming/${stream}?${params.join('&')}`); -- cgit