[feature] Support multiple subscriptions on single websocket connection (#1489)

- Allow Oauth authentication on websocket endpoint
- Make streamType query parameter optional
- Read websocket commands from client and update subscriptions
This commit is contained in:
darrinsmart
2023-03-11 02:10:58 -08:00
committed by GitHub
parent cb2f84e551
commit e323a930bf
4 changed files with 74 additions and 26 deletions

View File

@@ -63,8 +63,10 @@ type StreamsForAccount struct {
type Stream struct {
// ID of this stream, generated during creation.
ID string
// Timeline of this stream: user/public/etc
Timeline string
// A set of timelines of this stream: user/public/etc
// a matching key means the timeline is subscribed. The value
// is ignored
Timelines map[string]bool
// Channel of messages for the client to read from
Messages chan *Message
// Channel to close when the client drops away