twitchdev / twitch-cli

The official Twitch CLI to make developing on Twitch easier.
Apache License 2.0
604 stars 71 forks source link

EventSub Subscriptions are a child of a single WebSocket server #317

Open Xemdo opened 7 months ago

Xemdo commented 7 months ago

What is the problem?

Subscriptions currently exist in the context of a single server, which is incorrect. They should be updated based on actions within the server, such as a client disconnecting, but should not be exclusively attached to it. See: https://github.com/twitchdev/twitch-cli/blob/main/internal/events/websocket/mock_server/server.go#L35

Instead, there should be 4 concepts in the mock WebSocket server: