forked from DebaucheryLibrarian/traxxx
Disable notifications if showcase flag is disabled.
This commit is contained in:
@@ -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 [
|
||||||
|
|||||||
Reference in New Issue
Block a user