Model the Mastodon websocket connections and events
Definition
type StreamType = UserStream
| LocalPublicStream
| GlobalPublicStream
Stream type
User, local or global stream type
type WebSocketEvent = StatusUpdateEvent (Result String Mastodon.Model.Status)
| StatusNewEvent (Result String Mastodon.Model.Status)
| NotificationEvent (Result String Mastodon.Model.Notification)
| StatusDeleteEvent Mastodon.Model.StatusId
| ErrorEvent String
Websocket events
{ event : String
, payload : String
}
Websocket message