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
Update EventSub Documentation and fix non-existent type #77
Conversation
6200c68
to
42f7984
Compare
17585a0
to
5ab1b86
Compare
I also added a fix for the |
2abe4f6
to
1606dd8
Compare
I resolved this. Twitch switched to nanoseconds. Thanks to Dkamps18, he provied a regex for the datetime parser. |
- Fix timestamp format in signature verification - Deprecate USER_FOLLOW since it's now CHANNEL_FOLLOW. - Improve documentation
1606dd8
to
23e12fd
Compare
I don't feel comfortable with that much hacky regex in the |
The header looks like this:
|
Wow this is insane. I don't see any reason whatsoever to use a non-standard date format... Anyways how about a more flexible expression like We would receive the following named matching groups
preg_match('/^(?<pre>[\d\-:.T]+)\.(?<nano>\d{6,9})Z$/', $timestamp, $matches);
Carbon::createFromFormat(
'Y-m-d\TH:i:s.u\Z',
sprintf('%s.%dZ', $matches['pre'], substr($matches['nano'], 0, 6))
) |
They use RFC3339Nano in go lang. |
Any news on this PR ? |
Yes, i updated the regex, as requested. Hope this will be merged soon :) |
I now deploy this branch to Production and subscribe to 2.2 million webhooks. Let's see :D |
Alright, looks good! Could you at least squash the latest commits to remove the merge commit? I'd like to keep the history clean 😄 |
be0f197
to
df4c542
Compare
@romanzipp can you check it again. 🙏 |
Hey, I have revised the documentation a bit, so that everyone can understand how to use the EventSub.
Also I fixed a type. There had been a typo in it. It should be
channel.follow
instead ofuser.follow
.