Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Haelwenn
glitchsoc-fe
Commits
a69b492b
Verified
Commit
a69b492b
authored
Mar 31, 2018
by
Morgan Bazalgette
Committed by
Haelwenn
Jun 04, 2018
Browse files
handle empty message (ping) in ws
parent
9cff575d
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/javascript/mastodon/stream.js
View file @
a69b492b
...
...
@@ -74,7 +74,10 @@ export default function getStream(streamingAPIBaseURL, accessToken, stream, { co
const
ws
=
new
WebSocketClient
(
`
${
streamingAPIBaseURL
}
/api/v1/streaming/?
${
params
.
join
(
'
&
'
)}
`
);
ws
.
onopen
=
connected
;
ws
.
onmessage
=
e
=>
received
(
JSON
.
parse
(
e
.
data
));
ws
.
onmessage
=
e
=>
{
if
(
e
.
data
!==
''
)
received
(
JSON
.
parse
(
e
.
data
));
}
ws
.
onclose
=
disconnected
;
ws
.
onreconnect
=
reconnected
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment