feat(professors,sms): merge professor with users, add existing user link, professor portal endpoint, and SMS bypass list
This commit is contained in:
@@ -5,6 +5,7 @@ const { sendEmail } = require('./senders/emailSender');
|
||||
const { sendBaleMessage } = require('./senders/baleBotSender');
|
||||
const { resolveNotifyFlags } = require('./notifyResolver');
|
||||
const { findActionDef } = require('../components/settings/notificationActions');
|
||||
const { isSmsBypassNumber } = require('../components/settings/messagingFlags');
|
||||
|
||||
/**
|
||||
* Send SMS (via handler), email, and bot notifications for an action when enabled.
|
||||
@@ -26,7 +27,8 @@ const notifyAction = async ({
|
||||
const eventTag = relatedEvent || def?.relatedEvent || actionKey;
|
||||
const results = {};
|
||||
|
||||
if (flags.sms && phoneNumber && typeof smsHandler === 'function') {
|
||||
const isBypass = phoneNumber ? await isSmsBypassNumber(phoneNumber) : false;
|
||||
if ((flags.sms || isBypass) && phoneNumber && typeof smsHandler === 'function') {
|
||||
results.sms = await smsHandler();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user