Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/muxable/rtchat
Browse files Browse the repository at this point in the history
  • Loading branch information
kevmo314 committed May 12, 2024
2 parents e75bc96 + f51d223 commit 1da0b6b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/firebase-functions-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 16
- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
- run: npm ci && npm run build
working-directory: functions
6 changes: 6 additions & 0 deletions functions/src/eventsub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,12 @@ export const eventsub = functions.https.onRequest(async (req, res) => {
return;
} else if (status === "enabled") {
const type = req.body?.subscription?.type as EventsubType;
const version = req.body?.subscription?.version as string;

if (type === EventsubType.ChannelFollow && version === "1") {
console.log("rejecting channel.follow v1");
return;
}

const channelId = `twitch:${
req.body.event["broadcaster_user_id"] ??
Expand Down

0 comments on commit 1da0b6b

Please sign in to comment.