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 });