From 170d9963f70e210829bae69ebb925a904db23c4f Mon Sep 17 00:00:00 2001 From: martbost Date: Thu, 24 Sep 2026 13:58:17 -0500 Subject: [PATCH] Video sweep alert: admin channels only The alert names a member's campaign and their email address. It fell back to the shared payments topic when no admin chat was configured, which would have put a member's broken ad in front of the whole team. Admin chat or email, or it logs and stays quiet. Co-Authored-By: Claude Opus 5 --- server.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server.js b/server.js index a80e3f5..0ef5aa0 100644 --- a/server.js +++ b/server.js @@ -485,9 +485,11 @@ async function boot() { videosweep.init({ dataDir: DATA_DIR, fs, path, db, videoCheck, alert: async text => { const sc = siteConfig(); + // Admin channels ONLY. This names a member's campaign and their email, so it must never + // fall back to the shared payments topic where the whole team would read it. if (sc.telegramBotToken && sc.telegramAdminChatId) return telegramSend(sc.telegramAdminChatId, text); - if (sc.telegramBotToken && sc.telegramEchoChatId) return telegramSend(sc.telegramEchoChatId, text, sc.telegramEchoTopicId); if (ADMIN_EMAIL && mailer.hasKey()) return mailer.send(ADMIN_EMAIL, 'InstantAdPay: broken video sources', text.replace(/<[^>]+>/g, '')); + console.log('videosweep: no admin channel configured, alert not sent'); } }); videosweep.start(); toolkit.init({ dataDir: DATA_DIR, ads, accounts, siteConfig, coach, messages, promos, videomaker, chain });