docs: eventsub websocket example refactor#505
Conversation
Nerixyz
left a comment
There was a problem hiding this comment.
Thank you for updating the example!
A few comments/suggestions:
- Leave out the token refreshing. This can be a comment/TODO for the user, but it's a bit distracting.
- Similarly,
get_existing_subscriptionsshouldn't be needed if we track the subscriptions properly. The assumption is that the given token is only used by the example. - Split the
process_messageinto multiple functions to avoid nesting. - Could the state for a connection still live in some struct similar to before?
|
I agree with splitting it up more, tried doing a quick review but it was hard piecing together what it's actually doing without spending more time on it. |
Nerixyz
left a comment
There was a problem hiding this comment.
The structure looks good. Just a few minor things and some more comments.
There was a problem hiding this comment.
I think we can merge this, I'm not a huge fan of how it's done but this is more correct. We can improve the example more, I'll experiment with it myself in #477
|
Could you rebase the PR please |
|
seems to work. 👍 |
pr for #501
corrects the handling of reconnect events sent through eventsub websocket in accordance with twitch docs.
i'm making this a draft and looking for feedback because