Skip to content
Snippets Groups Projects
Commit 63a5f50e authored by HJ's avatar HJ :fire:
Browse files

fix deletes causing errors

parent 6acd8895
No related branches found
No related tags found
2 merge requests!1028`master` refresh with `develop`,!1012Streaming and Backend Interactor service overhaul, removed the need for copypasting
Pipeline #21001 passed
......@@ -1010,6 +1010,10 @@ export const handleMastoWS = (wsEvent) => {
const parsedEvent = JSON.parse(data)
const { event, payload } = parsedEvent
if (MASTODON_STREAMING_EVENTS.has(event)) {
// MastoBE and PleromaBE both send payload for delete as a PLAIN string
if (event === 'delete') {
return { event, id: payload }
}
const data = payload ? JSON.parse(payload) : null
if (event === 'update') {
return { event, status: parseStatus(data) }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment