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 <noreply@anthropic.com>
This commit is contained in:
@@ -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 });
|
||||
|
||||
Reference in New Issue
Block a user