diff --git a/src/routes/api/webhook/+server.ts b/src/routes/api/webhook/+server.ts index 6ed9d54..f43749b 100644 --- a/src/routes/api/webhook/+server.ts +++ b/src/routes/api/webhook/+server.ts @@ -2,7 +2,7 @@ import { createHmac, timingSafeEqual } from "node:crypto"; import type { RequestHandler } from "@sveltejs/kit"; import { HASH_SECRET } from "$env/static/private"; import { twitchChallengeEvent, twitchFollowEvent } from "$lib/twitch"; -import { client } from "$lib"; +import { client, followerSubject } from "$lib"; const getHmacMessage = (request: Request, body: string): string => { return ( request.headers.get(TWITCH_MESSAGE_ID)! + @@ -55,6 +55,7 @@ export const fallback: RequestHandler = async ({ request }) => { const { user_name } = event.data.event; + followerSubject.next(user_name); client.setRave(10_000); console.log(`${user_name} has just subscribed`);