feat(professors,sms): merge professor with users, add existing user link, professor portal endpoint, and SMS bypass list

This commit is contained in:
2026-08-25 03:48:19 +03:30
parent b708a6b777
commit 0a022c0917
14 changed files with 865 additions and 205 deletions
+3 -1
View File
@@ -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();
}