Add sessionHolding template, unique 8-digit codes, reason slot for sessionCancelled, and disable unused notifications

This commit is contained in:
2026-08-21 10:44:51 +03:30
parent 5328f36f06
commit 091e519280
28 changed files with 2180 additions and 280 deletions
+22
View File
@@ -0,0 +1,22 @@
'use strict';
const { pickNotifyFlags } = require('./notifyFlags');
const { getActionChannelFlags } = require('./notificationSettings');
/**
* Combines per-request notify flags (from admin forms) with dashboard per-action settings.
*/
const resolveNotifyFlags = async (source = {}, actionKey) => {
const request = pickNotifyFlags(source);
const dashboard = await getActionChannelFlags(actionKey);
return {
sms: request.sms && dashboard.sms,
email: request.email && dashboard.email,
bot: request.bot && dashboard.bot
};
};
module.exports = {
resolveNotifyFlags
};