forked from AkkomaGang/akkoma-fe
don't try to parse pong
This commit is contained in:
parent
e48506844d
commit
3d921c81bd
1 changed files with 2 additions and 0 deletions
|
@ -1440,6 +1440,8 @@ export const ProcessedWS = ({
|
||||||
export const handleMastoWS = (wsEvent) => {
|
export const handleMastoWS = (wsEvent) => {
|
||||||
const { data } = wsEvent
|
const { data } = wsEvent
|
||||||
if (!data) return
|
if (!data) return
|
||||||
|
if (data === 'pong') return
|
||||||
|
|
||||||
const parsedEvent = JSON.parse(data)
|
const parsedEvent = JSON.parse(data)
|
||||||
const { event, payload } = parsedEvent
|
const { event, payload } = parsedEvent
|
||||||
if (MASTODON_STREAMING_EVENTS.has(event) || PLEROMA_STREAMING_EVENTS.has(event)) {
|
if (MASTODON_STREAMING_EVENTS.has(event) || PLEROMA_STREAMING_EVENTS.has(event)) {
|
||||||
|
|
Loading…
Reference in a new issue