Skip to content

Commit

Permalink
fix: reject channel.follow v1 (#1242)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevmo314 authored May 7, 2024
1 parent 4283406 commit 26f6305
Showing 1 changed file with 6 additions and 0 deletions.
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 26f6305

Please sign in to comment.