phase 9 notification toggles (per-alert, per-category, master; default-disabled)
This commit is contained in:
@@ -13,6 +13,7 @@ const { CONFIG, parseThresholdString } = require('../config');
|
||||
const { increment } = require('./patternStore');
|
||||
const { enqueueSend } = require('./channelQueue');
|
||||
const { assertKeysRegistered } = require('./notificationRegistry');
|
||||
const { isEnabled } = require('./notificationEnabled');
|
||||
|
||||
// Alert key this module drives. Registered to fail fast on drift.
|
||||
const UNCLAIMED_ALERT_KEYS = ['unclaimed_reminder'];
|
||||
@@ -60,6 +61,7 @@ async function notifyStaffOfReply(guild, ticket, message) {
|
||||
* threshold) into every staff notification channel.
|
||||
*/
|
||||
async function notifyAllStaffUnclaimed(client) {
|
||||
if (!isEnabled('unclaimed_reminder')) return;
|
||||
const rawThresholds = (CONFIG.NOTIFICATION_THRESHOLDS && CONFIG.NOTIFICATION_THRESHOLDS.unclaimed_reminder) || [];
|
||||
const thresholds = rawThresholds
|
||||
.map(parseThresholdString)
|
||||
|
||||
Reference in New Issue
Block a user