A parsed event from Mastodon's streaming WebSocket
Fields
streams- the stream names this event was delivered ontype- the event type, e.g."update","notification","delete"payload- the decoded payload: an entity struct for known types, the bare id string fordelete/announcement.delete,nilfor payload-less events, or the raw payload for unknown types
Summary
Functions
Parses a raw WebSocket text frame into an event.
Types
Functions
Parses a raw WebSocket text frame into an event.
Mastodon frames look like
{"stream": ["user"], "event": "update", "payload": "<JSON string>"} —
the payload is itself JSON-encoded, except for delete (a bare id) and
payload-less events. Unknown event types are passed through with the raw
payload so new server-side types keep flowing.