-
Notifications
You must be signed in to change notification settings - Fork 42
docs: eventsub websocket example refactor #505
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Nerixyz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The structure looks good. Just a few minor things and some more comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. 👍 |
Emilgardis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you!
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