feat: add more SSE events to rubgram

This commit is contained in:
2026-04-03 19:38:51 +07:00 Unverified
parent 92592a2d0c
commit f88dc09095
3 changed files with 13 additions and 3 deletions
+1 -1
View File
@@ -280,7 +280,7 @@ const redisSubscribers: Record<
type RubgramEvent = { type: "submit" | "paid" | "cancel"; sub: string };
if (event !== "update") return;
const { type, sub } = data as RubgramEvent;
if (type === "cancel") return;
if (!(type === "submit" || type === "paid")) return;
if (!process.env.WEBHOOK_RUBGRAM_SUBMIT) return;
const body = rubgramWebhookTemplate(
type,