-
-
Notifications
You must be signed in to change notification settings - Fork 44
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
Feature evensub #58
base: master
Are you sure you want to change the base?
Feature evensub #58
Conversation
app.js
Outdated
* @returns { string | null } | ||
*/ | ||
async function fetchClientIdIfValidAsync( password ) { | ||
const requiredScopes = [ "channel:read:redemptions", "user:read:email" ]; |
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.
Should we make this optionally definable so that it can support more than redemptions too?
} | ||
} | ||
|
||
const ws = typeof window !== "undefined" |
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 it might be good to be able to have this websocket available outside of the function or to return it after the connect completes to be able to call it and disconnect or do other things with it. What do you think?
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.
are we planning on using it outside point rewards?
https://dev.twitch.tv/docs/eventsub/handling-websocket-events/#revocation-message
IMPORTANT By default, you have 10 seconds from the time you receive the Welcome message to subscribe to an event, unless otherwise specified when connecting. If you don’t subscribe within this timeframe, the server closes the connection.
I'm not sure if that applies to first subscription or the entire lifecycle
i think it would be reasonable to return the obscured onDisconnect
function
appending event sub or replacing pubsub