Disable notifications if showcase flag is disabled.

This commit is contained in:
DebaucheryLibrarian 2024-06-05 03:11:49 +02:00
parent c849d097e1
commit 2a4b0e9636
1 changed files with 7 additions and 0 deletions

View File

@ -2,6 +2,8 @@
const escapeRegexp = require('escape-string-regexp'); const escapeRegexp = require('escape-string-regexp');
const argv = require('./argv');
const logger = require('./logger')(__filename);
const knex = require('./knex'); const knex = require('./knex');
const { indexApi } = require('./manticore'); const { indexApi } = require('./manticore');
const bulkInsert = require('./utils/bulk-insert'); const bulkInsert = require('./utils/bulk-insert');
@ -63,6 +65,11 @@ async function removeAlert(alertId) {
} }
async function notify(scenes) { async function notify(scenes) {
if (argv.showcased === false) {
logger.info(`Skipping notify for ${scenes.length} scenes because showcase flag is disabled.`);
return [];
}
const sceneIds = scenes.map((scene) => scene.id); const sceneIds = scenes.map((scene) => scene.id);
const [ const [